Datadog
5 questions · Coding · System design
Design and implement an LRU cache with O(1) get and put.
CodingApproachCombine a hash map with a doubly linked list; move touched nodes to the front, evict from the tail.
EvaluatesComposing data structures to hit tight time bounds and getting the eviction bookkeeping right.
Count the number of islands in a 2D grid of land and water.
CodingApproachFlood-fill each unvisited land cell with BFS/DFS and mark visited; count how many fills you start.
EvaluatesGraph traversal on a grid, visited-state management, and complexity analysis.
Design a rate limiter for a public API.
System designApproachCompare token bucket vs. sliding window, where state lives (per-node vs. Redis), and behavior under bursts.
EvaluatesAlgorithm choice, distributed state, and failure/consistency trade-offs.
Design a real-time chat / messaging system.
System designApproachCover connection handling (WebSocket), delivery/ordering guarantees, storage, and presence.
EvaluatesReal-time delivery, ordering, and durability under scale.
Tell me about a time you failed and what you changed afterward.
BehavioralApproachPick a real failure, own it without blaming others, and show the concrete lesson you applied later.
EvaluatesSelf-awareness, accountability, and growth.
Practice these with a free AI mock
Get graded on your real answers, with feedback after every round.
Practice free