-
What is the correct method used to insert and delete items from the queue?
-
- add and remove
- enqueue and peek
- push and pop
- enqueue and dequeue
- None of these
Correct Option: D
enqueue is pushing item into queue; dequeue is removing item from queue; peek returns object without removing it from queue.
Stack uses push and pop methods. add and remove are used in the list.