Question: 3) Consider a full stack S1 of size 4 and empty stacks S2 and S3 of size 4 . What are the contents of the

3) Consider a full stack S1 of size 4 and empty stacks S2 and S3 of size 4 . What are the contents of the stacks and their tops after each iteration? while (!S1.empty()) if(!S2.full()) S2.push(S1.pop()); while(!S2.empty()) if(!S3.full()) S3.push(S2.pop())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
