40 Stack 3 Existing Elements Push Pop Double Push Pop Double Push Many Elements Stack Conc Q37119940

40. On a stack with 3 existing elements, push, then pop, thendouble push, then pop, then double push again?

How many elements are on the stack at conclusion of theoperation?  

6,5,4,7

  • A user wants to return an element from any given position in adata set.
    • Which ADT is needed to accomplish this using get()operation?

List, stack, queue, string

  • Under which condition is a first object considered to be aduplicate of a second object?

First.equals(second) returns true andnull

First.equals(second) returns null

First.equals(second) returns true

First.equals(second) returns false

  • What is the output of the python code ?

A = { 1 ;”A”; 2;”B”, 3;”C”}

B=

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.