Write a program to create a queue of size N specified by the user. Then you will be given an K value. K value represents the no.of elements to be inserted into the queue. After completion of insertion process print the element from starting of the queue to ending of the queue.
Answers
Answered by
1
Answer:
Given an integer k and a queue of integers, we need 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 queue.
enqueue(x) : Add an item x to rear of queue
dequeue() : Remove an item from front of queue
size() : Returns number of elements in queue.
front() : Finds front item.
Answered by
1
Answer:
Nanotechnology is the term given to those areas of science and engineering where phenomena that take place at dimensions in the nanometre scale are utilised in the design, characterisation, production and application of materials, structures, devices and systems.
Similar questions