Problems › Topics › Simulation
Simulation practice problems
No clever trick: model the process faithfully and step it forward. A pattern: a move you make, and the kind of thing an interview is really asking you to spot. 12 problems in the bank train it, each with a worked example, a hint and a reference solution.
- Math
- Strings
- Arrays
- Hash maps
- Sorting
- Parsing
- Two pointers
- Sliding window
- Prefix sums
- Stacks
- Binary search
- Intervals
- Grids
- Greedy
- Recursion
- Simulation
- Bit manipulation
12 problems
- Steps to reach oneeasy
- Balance after yearly compoundingeasy
- Split one CSV line properlyhard
- Decide each call against a rate limithard
- Months to clear the loanhard
- How much work is still queuedhard
- Replay a day of stock movementsmedium
- Pick an order off the shelvesmedium
- Charge each request only oncemedium
- How long to clear the order bookmedium
- When does the order actually arrivemedium
- Replay a log that can take it backmedium