Cloudflare
5 questions · Coding · System design
Reverse a singly linked list in place.
CodingApproachIterate with three pointers (prev, curr, next), rewiring links; discuss the recursive variant and its stack cost.
EvaluatesPointer manipulation, in-place mutation, and clarity under a deceptively simple task.
Return the k-th largest element in an unsorted array.
CodingApproachA size-k min-heap, or quickselect for average O(n); discuss the trade-offs.
EvaluatesHeap vs. selection trade-offs and awareness of average vs. worst case.
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 search autocomplete / typeahead service.
System designApproachTrie or prefix index, top-k ranking, caching, and updating suggestions from live traffic.
EvaluatesLatency budget, data-structure choice, and freshness vs. cost.
Describe a project you are most proud of and your specific contribution.
BehavioralApproachAnchor to measurable impact; be crisp about what YOU did vs. the team, and the trade-offs you made.
EvaluatesOwnership, impact, and honest self-attribution.
Practice these with a free AI mock
Get graded on your real answers, with feedback after every round.
Practice free