Tag
heap
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
GPU Credits: Out-of-Order Grants and Expiring Credits
Replay timestamped credit events with an expiry-ordered heap, then cache balances across a bounded time horizon. Includes tested Java and Python solutions.