Question: Write a Java Program implement M number stacks that should use only one array. The M number stacks must support these functions push and pop
Write a Java Program implement M number stacks that should use only one array. The M number stacks must support these functions push and pop with stacks number. Ex: push(A,0) pushes A letter to stack-0 and pop(3) takes element from stack-3. Consider the efficiency of your approach. (20 pt.)
myStackArray [ stack0 | stack1 | stack2 | stack3| . | stack M-1 ]
Explain your critical methods and classes. Discuss which data structures you used to overcome faced problems
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
