← Back to blog Bloomberg Internship Interview Debrief: Merge Intervals With Gap + Longest Alternating Subarray
Bloomberg

Bloomberg Internship Interview Debrief: Merge Intervals With Gap + Longest Alternating Subarray

2026-06-06

Bloomberg's internship interview runs at a moderate pace with medium-low difficulty, but it weighs thought organization, problem decomposition, and verbal communication far more than code execution. The first round is 60 minutes in three segments: an opening project chat, two algorithm problems, and a short QA. Both problems are done on HackerRank but you do not run the code—the focus is verbal reasoning: explain your approach first, get the interviewer's nod, then write. Here is the full debrief.

Bloomberg Internship Interview at a Glance

Dimension Details
Duration 60 minutes
Platform HackerRank (no screen share required)
Structure 10 min project chat + 45 min two problems + QA
Difficulty Medium-low; reasoning and articulation matter
Requirement Explain first, then code; report complexity after

It opens with a brief self-intro plus picking one most interesting project to detail. Bloomberg's questions here are templated and do not dig into technical internals: biggest challenge, what you'd improve if redone, your role in team collaboration, why Bloomberg. You rarely fail on this segment.

Problem 1: Merge Intervals With a Custom Gap Rule

Given a set of intervals [start, end], unlike classic overlap merging, a new rule applies: if two intervals are within a gap of at most k, they also merge. For input [[1,3],[6,8],[9,10]] with k = 2, the second and third merge into [6,10].

Reframe: classic merging tests next_start <= end; here we relax it to next_start <= end + k. Sort by start, then scan linearly, maintaining the current merged interval (start, end).

def merge_with_gap(intervals, k):
    if not intervals:
        return []
    intervals.sort(key=lambda x: x[0])
    res = []
    cs, ce = intervals[0]
    for s, e in intervals[1:]:
        if s <= ce + k:                 # merge when the gap is <= k
            ce = max(ce, e)
        else:
            res.append([cs, ce])
            cs, ce = s, e
    res.append([cs, ce])
    return res

Time: O(n log n) (sort dominates). Space: O(n) (result list).

Follow-up: how to handle an infinite streaming input? You cannot sort everything up front. My answer: maintain active intervals in a balanced tree / min-heap, and for each incoming interval try merging with neighbors so the merge happens online. The key is articulating why offline sorting fails under streaming.

Problem 2: Longest Alternating Subarray

Given an integer array, find the longest contiguous subarray where the sign of differences between adjacent elements alternates. For example [1,3,2,4,3] is valid because the difference signs are + - + -.

Reframe: brute force is O(n²), but a single O(n) pass works: track the current alternating length and the previous difference's sign. If the current sign differs from the previous, extend by one; if it matches, restart counting from the current pair.

def longest_alternating(nums):
    n = len(nums)
    if n < 2:
        return n
    best = 1
    cur = 1
    prev_sign = 0                       # 0 means undetermined
    for i in range(1, n):
        diff = nums[i] - nums[i - 1]
        if diff == 0:
            cur = 1                      # equality breaks the run
            prev_sign = 0
            continue
        sign = 1 if diff > 0 else -1
        if prev_sign == 0 or sign == prev_sign:
            cur = 2                      # restart with this pair
        else:
            cur += 1                     # alternating sign, extend
        prev_sign = sign
        best = max(best, cur)
    return best

Time: O(n). Space: O(1).

Follow-up: modify in place so the prefix holds the longest alternating subarray. My answer: use two pointers—while scanning, a write pointer overwrites the array, moving the longest alternating run into the prefix. Just explain why the read and write pointers never collide.

Bloomberg Internship Scoring Logic

Dimension What the interviewer watches
Clarity of approach Can you explain the algorithm before coding
Complexity awareness Do you report time/space and its source
Follow-up agility Can you derive streaming / in-place on the spot
Communication Verbal reasoning throughout, not silent coding

The pace is moderate and difficulty medium-low—more an evaluation of programming fundamentals and communication. Neither problem requires running, so articulation matters more than AC.

Prep Suggestions


FAQ

What platform does the Bloomberg internship interview use, and how many rounds?

The first round is on HackerRank, 60 minutes, covering a project chat plus two algorithm problems and QA, with no screen share required. More rounds follow, but the first is the gate that filters fundamentals and communication.

Are Bloomberg internship problems hard?

Medium-low. They cluster on high-frequency basics like merge intervals, two pointers, and single-pass scans, rarely with tricks. The difficulty lies in follow-ups (streaming, in-place) and whether your verbal explanation is clear.

If you don't run the code, what gets scored?

Whether you explain the approach before coding, report complexity afterward, and can derive follow-ups live. Bloomberg explicitly weighs reasoning and communication over an AC result. To lock in points here, we offer live VO support / VO proxy / interview assistance pairing to sharpen your reasoning and articulation.

Can the project chat fail you?

Rarely. Bloomberg's project questions are templated (biggest challenge, how to improve, your role, why Bloomberg) and avoid deep technical internals—just prepare one project where you can clearly explain a challenge and your improvements.


Preparing for the Bloomberg internship interview?

Bloomberg tests fluency on basics plus verbal reasoning and follow-up agility. If you want timed mocks of these two problems, focused drills on merge-intervals / single-pass variants, or a full process debrief, reach out: share the job description so we can predict the problem set and plan practice, with live VO support / VO proxy / interview assistance pairing available.

Add WeChat Coding0201 to get Bloomberg internship problems and mocks.

Contact