Professional Documents
Culture Documents
03 Stack and Queue Data Structures1
03 Stack and Queue Data Structures1
03 Stack and Queue Data Structures1
• Pop an item from stack with pop() which will return 123, Count = 1
_____
_____
___56
• Push 2 items with calls to push(45); followed by push(87); Count = 3 stack full
___87
___45
___56
• Three calls to pop(); return 87, 45, and 56 in order, and empty the stack