0

How to implement Stack data structure without using Stack Class? Base on the sample

Enter # on input: 5 (note: # of input may vary) Example Input: 1 2 3 4 5 Menu: [1]Reverse Even [2]Reverse Odd [3]Exit If choice == 1 Output: 4 2 if Choice == 2 Output: 5 3 1

24th Nov 2021, 11:20 AM
Sheng
3 Antworten
+ 3
I really hope you like it, I made this for you https://code.sololearn.com/cVwqojPtTxy3 // Keep learning & happy coding :D
24th Nov 2021, 1:32 PM
SoloProg
SoloProg - avatar
+ 2
Look at this, learn how it works first. Figure out how to traverse the data structure afterwards. https://www.sololearn.com/learn/760/?ref=app
24th Nov 2021, 1:22 PM
Ipang
0
SoloProg can you help me do it in encapsulation?
24th Nov 2021, 4:53 PM
Sheng