Rotate Array — three reversals
Reverse the whole array, then reverse the first k values, then reverse the rest. No extra array needed.
Try:
← Prev
Next →
▶ Play
Reset
1. reverse all
2. reverse first k
3. reverse the rest