Page 1 of 1

Exercise 2: Write a program to reverse element of a stack. For any given word (from input), insert every character (from

Posted: Fri Jul 01, 2022 5:53 am
by answerhappygod
Exercise 2 Write A Program To Reverse Element Of A Stack For Any Given Word From Input Insert Every Character From 1
Exercise 2 Write A Program To Reverse Element Of A Stack For Any Given Word From Input Insert Every Character From 1 (29.23 KiB) Viewed 50 times
Exercise 2: Write a program to reverse element of a stack. For any given word (from input), insert every character (from the word) into a stack. The output from the stack should be the same as the input. Your program should be using a stack and a queue to complete this process. 1. Push into stack 2. Pop from stack 3. Enqueue into queue 4. Dequeue from queue 5. Push into stack 6. Pop from stack and display I Page 1 of 1