🎯 The three steps (Goal & Hints)
1Use stack<int> to reverse the first K elements (LIFO).
2Pop them back into the queue — now reversed, sitting at the rear.
3Rotate the remaining N−K elements so their order is kept (FIFO).
Goal: use the STL stack + queue and see for yourself that a stack reverses order while a queue preserves it.
Why does it work? The first K go through the stack and come out reversed; the remaining elements are simply moved from front to rear N−K times, so their relative order is untouched.