Design a lottery/registration system supporting add participant, remove participant, and get a random participant, all in O(1).
hash map + array swap-delete (Insert Delete GetRandom O(1))
sometimes reported
Tests: Combining data structures to hit strict per-operation complexity targets.
Approach: Pair a hash map (value to index) with a dynamic array; delete by swapping the target with the last element. The random requirement is what forces the array - reason out loud about why a map alone fails.
A car travels between points on a grid; find whether it can reach the destination, then extend for obstacles, then for gas stations that affect its range.
grid DFS/BFS with staged constraints
sometimes reported
Tests: Graph traversal plus how gracefully your solution absorbs new requirements.
Approach: Start with plain DFS/BFS over the grid, keeping the state you track (position, remaining range) explicit so each follow-up becomes a state extension rather than a rewrite. One London round wanted the approach explained without code at all.
Compute the sum of two integers digit by digit, by place value, without adding them directly.
digit manipulation / carry simulation
reported once
Tests: Careful implementation of elementary logic - carries, unequal lengths, final overflow.
Approach: Walk both numbers from least-significant digit with a carry variable, exactly like column addition. The edge cases (different lengths, trailing carry) are the actual test.
Given a stream of trade ticks (product name, traded volume), report the top k products by volume at end of day, then continuously throughout the day.
hash map + heap (top-k aggregation)
frequently reported
Tests: Choosing data structures for batch versus streaming aggregation - Bloomberg's home turf.
Approach: End-of-day is a hash-map tally plus a size-k min-heap. The streaming variant is the real question: discuss why a heap alone breaks when counts increase, and what structure supports updatable priorities.
Design Underground System: implement swipeIn, swipeOut, and average travel time between two stations.
hash-map design (LC 1396)
frequently reported
Tests: Modeling entities with the right map keys and being grilled on data-structure choices.
Approach: One map keyed by traveler id for in-progress trips, another keyed by (source, destination) pairs accumulating total time and count. Expect the interviewer to push on your key choices more than your code.
Implement a custom sorting comparator for a specialized alphabet (a "Welsh sort") where letters can be one- or two-character strings.
custom comparator + string parsing
reported once
Tests: Precise comparator logic and tokenizing strings under a non-standard alphabet.
Approach: First tokenize each word into alphabet units (handle two-character letters greedily), then compare token sequences by the alphabet's order. The candidate reported the interviewer cared about thought process over perfect execution.
Coding pairs from a five-round loop: Candy Crush and swap adjacent linked-list nodes in one round; minimum changes to make two strings anagrams and Subsets in another.
simulation, linked list, counting, backtracking
reported once
Tests: Range across the Bloomberg-tagged list - two problems per round under time pressure.
Approach: These are all Bloomberg-tagged LeetCode problems. The anagram question is frequency-count subtraction; Subsets is standard backtracking or bitmask enumeration. Practice doing two mediums in one hour, since that pacing is the real difficulty.
Given a directed graph of flight routes, implement an AirMap class with add_to_map and print_all_routes methods.
graph DFS with path enumeration
reported once
Tests: Building a small class around a graph and enumerating paths cleanly, with two senior engineers watching.
Approach: Adjacency list plus DFS with a current-path stack and backtracking. Clarify cycle handling before coding - route graphs can loop, and asking is part of the assessment.
Given currency conversion rates like ['USD','GBP',0.77], find the conversion rate between two arbitrary currencies.
graph BFS/DFS with weighted edges
sometimes reported
Tests: Spotting that a ratio-lookup problem is a graph problem.
Approach: Currencies are nodes, rates are edge weights; a path's rate is the product of its edges. BFS or DFS with a visited set suffices - mention how you would handle a missing path.
Traverse a graph with BFS and return the frequency count of nodes at a given level.
BFS level tracking
reported once
Tests: Level-by-level BFS bookkeeping on a graph (not just a tree).
Approach: Standard queue BFS processing one level per outer iteration, with a visited set since it is a graph. Count when the current depth matches the target level.
Copy a linked list with random pointers, plus follow-up discussion of how a HashMap works internally.
linked list + hash map internals
reported once
Tests: A classic pointer problem and whether you understand the structures you reach for.
Approach: Map original nodes to clones in one pass, wire next/random in a second. Then be ready for buckets, hashing, collision handling, and resizing - Bloomberg interviewers reportedly ask how your tools work under the hood.