Examples
Input: (1, [('A', 0, 100), ('B', 80, 180)])
Expected Output: [('A', 0, 100), ('B', 101, 180)]
Explanation: The overlap [80..100] exceeds limit=1, so delay B to start at 100+1=101.
Input: (1, [('A', 0, 2), ('B', 5, 7)])
Expected Output: [('A', 0, 4), ('B', 5, 7)]
Explanation: No overlaps, but keys 3..4 are uncovered within [0..7]. Extend A to cover the gap.
Input: (2, [('A', 0, 4), ('B', 1, 5), ('C', 2, 6)])
Expected Output: [('A', 0, 4), ('B', 1, 5), ('C', 5, 6)]
Explanation: At key 2, starting C would create 3 overlaps (>2), so delay C until after A ends: 4+1=5.
Input: (1, [('A', 0, 0), ('B', 0, 0), ('C', 1, 1)])
Expected Output: [('A', 0, 0), ('C', 1, 1)]
Explanation: B would overlap at key 0, so it is delayed to 1, becoming empty (1>0) and removed.
Input: (1, [('X', -5, -1), ('Y', -3, 2)])
Expected Output: [('X', -5, -1), ('Y', 0, 2)]
Explanation: Overlap at -3..-1 exceeds limit=1, so delay Y to start at -1+1=0.
Input: (1, [])
Expected Output: []
Explanation: No shards to rebalance.
Input: (1, [('A', 0, 0), ('B', 0, 1), ('C', 1, 2)])
Expected Output: [('A', 0, 0), ('B', 1, 1), ('C', 2, 2)]
Explanation: B is delayed to start at 1, then C is delayed to start at 2 to avoid overlap > 1.
Input: (3, [('S', 5, 5)])
Expected Output: [('S', 5, 5)]
Explanation: Single shard already satisfies the overlap limit and covers the full span [5..5].