- 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 49 times
Exercise 2: Write a program to reverse element of a stack. For any given word (from input), insert every character (from
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Exercise 2: Write a program to reverse element of a stack. For any given word (from input), insert every character (from
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