InterviewSolution
Saved Bookmarks
| 1. |
Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. How do you implement ENQUEUE and DEQUEUE operations of queue using these instructions |
| Answer» SUPPOSE a STACK implementation supports an instruction REVERSE, which REVERSES the order of ELEMENTS on the stack, in addition to the PUSH and POP instructions. ... | |