To move [l,r] to the front:
1. Split at l: get [0,l−1] and [l,n−1]
2. Split the second part at r−l+1: get [l,r] and [r+1,n−1]
3. Merge: [l,r]+[0,l−1]+[r+1,n−1] Each split and merge is O(logn). With 3 splits and 2 merges, total time per operation is O(logn). This pattern (split, rearrange, merge) handles many sequence manipulation problems.