Tag
intervals
Coding
Rebalance Overlapping Shard Ranges
A greedy sweep with a min-heap and a monotone frontier, explained with runnable Java and Python solutions and boundary tests.
Coding
Build a Memory Allocator: First-Fit, Best-Fit, and Coalescing
Track free intervals by address and size, merge on free, and implement both allocation policies in Java and Python.