Level: Senior-Level
Round: Onsite · Type: System Design · Difficulty: 7/10 · Duration: 120 min · Interviewer: Unfriendly
Topics: Data Structures
Location: San Francisco Bay Area
Interview date: 2026-01-15
Got offer: False
I had an onsite interview consisting of two rounds: a coding round and a Hiring Manager round. However, the HM round was cancelled a few days before the interview.
The problem I was given involved building a core component for a real-time analytics system to monitor the profitability of various experiences (games, features, events) on a large online platform. The component needed to efficiently track and report the current highest-earning experience at any given time.
My system would receive two types of operations:
I needed to implement a function that could process a sequence of these operations and return results for the queries. I received three arrays of equal length:
operations: An array of 'U' (Update) and 'Q' (Query) characters.experiences: An array of strings, where experience[i] is the name of the experience involved in operations[i].deltas: An array of integers, where delta[i] is the profit delta for the experience if operations[i] is 'Update'. For queries, the value is unused.