Sorting practice problems
Put things in order first and the question often answers itself. A pattern: a move you make, and the kind of thing an interview is really asking you to spot. 17 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
17 problems
- Rest-period violations in the hand-offseasy
- Find the first free slot in a dayhard
- Merge overlapping bookingshard
- The order that sortshard
- Is there enough breathing room between slotshard
- How many rooms are needed at peakhard
- Which station has the least workhard
- Which parts need attention firstmedium
- The best selling products this weekmedium
- The middle of a set of readingsmedium
- The p95 of a batch of latenciesmedium
- The middle of the listmedium
- Are these two an anagrammedium
- How many people try to book the same slotmedium
- Largest uncovered stretch of the daymedium
- Most people on the floor at oncemedium
- The first missing sequence numbermedium