Round 1: Coding
The first round was coding. The problems were mainly graph / topological sort related. Overall the difficulty was not especially high; if you prepare graph, BFS/DFS and topological sort normally, you should be able to cover it.
Round 2: System Design
The second round was system design, and the question was to design a ticket booking system (a system for grabbing tickets the moment they go on sale).
The interviewer cared about two core issues:
Sudden high-concurrency traffic
- At the moment tickets open, a huge number of users may send requests at the same time
- You need to think about load balancing, a queue / waiting room, and rate limiting
- How to keep the traffic from knocking over the backend and the database directly
Inventory and concurrency control
- The same ticket cannot be bought by two people at the same time
- How to handle stock deduction, reservation / hold, and releasing the hold when payment times out
- How to guarantee consistency and avoid overselling
We also discussed cache, the database, and the problem of updating inventory under high concurrency.
It happened to be the National Day holiday, so HR is probably still on vacation and I haven't heard back yet. I'll update if there is a result later. I'm also preparing for other interviews these days and want to see more interview reports.
Discussion
Loading comments…