Bloomberg OA 2026 | Order Book Snapshot & Pinterest Viral Pin Tracker

Question · Posted Jun 2026

Problem 1 - Order Book Snapshot Problem Statement You are building an in-memory order book. The system receives three types of operations: UPDATE(id, price, quantity) DELETE(id) GET_SNAPSHOT() UPDATE: If id exists, overwrite the order. If id does not exist, create it. DELETE: Remove the order from the system. GET_SNAPSHOT: Return all active orders sorted by id ascending. Format each order as: id:price:quantity Join entries using semicolons. Constraints Constraint 1 ≤ Number of Events ≤ 105 1 ≤ id, price, quantity ...

The full answer & interview discussion are available to premium members.

Log in Create a free account