1. What is the state of the stack after the following sequence of pushes and pops: Stack *s; s->push( 3 ); s->push( 5 );
Posted: Sat May 14, 2022 2:58 pm
1. What is the state of the stack after the following sequence of pushes and pops: Stack *s; s->push( 3 ); s->push( 5 ); s+push( 2 ); s->push( 15 ); s->push( 42 ); s-popO; spopO; s+push( 14 ); s>push( 7); spopO; s+push( 9 ); spopO; spopO; s->push( 51 ); spopO; spopO;