Intermediate · Coding interviews: heaps, recursion and intervals
Heaps
Six interview problems a heap answers: the cheapest way to join ropes, the median of a stream as it grows, many sorted streams merged into one, the kth largest of a stream so far, a string rearranged so no two letters alike touch, and the pairs with the smallest sums.
- You build
- ropes.py, then medians.py, then merging.py, then kth.py, then reorganize.py, then pairs.py
- Stages
- 6 Problems
- Time
- About 2.5 hours
Loading the workspace…
Loading the workspace…