Reversing the first K elements of a Queue
Given an integer k and a queue of integers, The task is to reverse the order of the first k elements of the queue, leaving the other elements in the same relative order.Only following standard operations are allowed on the queue. enqueue(x): Add an item x to rear of queuedequeue(): Remove an item fr