Question: how we got an output ( 2 , 4 ) , explanition in details please ! top() = peek() returns the top elemet . and
What is the output of the below code? public static void main (String [] args) Stack s1 = new stack(10); stack s2 = new stack(10); for(inti=0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
