Bloomberg | July 2022 | Offer Accepted
- Result
- Offer
- Posted
- 25 Jul 2022
Summary
I successfully landed an offer at Bloomberg after extensive preparation, leveraging LeetCode and specific Bloomberg resources. The interview process was straightforward, covering data structures, algorithms, system design, and behavioral questions, with a focus on problem variations.
How it went
I had been diligently preparing for interviews since October 2020, and I must say, this platform and its community were instrumental in helping me secure an amazing offer at Bloomberg. It feels right to share my journey.
My interview process began with a Phone Interview. We discussed the longest substring without repeating characters, which I solved quite quickly. I noticed that many problems were variations of common themes, but always approachable. We also had a system design overview of an LRU cache; there was no coding, just a detailed discussion of the problem and my approach.
The Interview Day consisted of two main sessions. In the first interview, I tackled two questions: first, finding all unique subsets, and then immediately followed by finding unique subsets with duplicates included in the input. The second interview also featured two questions. I was asked to design a data structure for O(1) insert/delete/getRandom operations. The next question involved stock ticking, which had similarities to a leaderboard design problem. I also had a behavioral interview, which was seamless—I just focused on being myself and taking it easy.
Finally, I interviewed with a Senior Engineer. As an ML/AI engineer, we spent a significant amount of time discussing my prior experience. Surprisingly, the engineer presented me with the two sum problem, but we explored every possible variation, nearly five similar questions under the two sum umbrella. They wanted me to articulate my code line-by-line.
I managed to code almost every question perfectly, except for the stock ticking problem. I admit, I psyched myself out a bit, even though I knew a hashmap/priority queue approach was my best bet. I believe I navigated this question successfully by communicating my best solution, even though I was a bit stumped on the exact syntax implementation. It's crucial to remember that you can always ask if you can look something up; I completely forgot I had that option! I was elated to receive the offer, especially after struggling slightly with that stock ticking problem.
Questions asked (7)
- 01
Longest Substring Without Repeating Characters
Data Structures & Algorithms
Open the problemGiven a string
s, find the length of the longest substring without repeating characters. - 02
Design LRU Cache
System Design
Open the problemDesign and implement a Least Recently Used (LRU) cache. It should support
getandputoperations. Theget(key)method should retrieve the value of the key if it exists, otherwise return -1. Theput(key, value)method should insert or update the value. If the number of keys exceeds the capacity from this operation, it should invalidate the least recently used key before inserting a new item. - 03
Subsets
Data Structures & Algorithms
Open the problemGiven an integer array
numsof unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. - 04
Subsets II
Data Structures & Algorithms
Open the problemGiven an integer array
numsthat may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. - 05
Insert Delete GetRandom O(1)
Data Structures & Algorithms
Open the problemDesign a data structure that supports all following operations in O(1) average time.
insert(val): Inserts an item val to the set if not already present.remove(val): Removes an item val from the set if present.getRandom(): Returns a random element from current set of elements. - 06
Stock Ticking
System Design
I was asked a stock ticking problem, which is conceptually similar to designing a leaderboard. It involves processing real-time stock price updates and maintaining some form of aggregate data or ranking, potentially requiring efficient updates and queries.
- 07
Two Sum Variations
Data Structures & Algorithms
Open the problemGiven an array of integers
numsand an integertarget, return indices of the two numbers such that they add up totarget. I was asked this problem along with about 5 of its variations, requiring me to talk through my code line-by-line for each.
How they prepared
My primary resources included the official Bloomberg Prep List and Phone Interview List available on LeetCode. I also utilized a comprehensive Cohesive Notion List and extensively practiced problems tagged with 'Bloomberg' on LeetCode. Additionally, I found it beneficial to switch up my study methods by watching YouTube explanations of problems, practicing basic data structures on Codecademy, and reviewing algorithms on Programiz to keep my brain engaged and avoid burnout.