Explain what is the difference between PUSH and POP?

Category: Data StructureExplain what is the difference between PUSH and POP?
1 Answers
Editor">Editor Staff answered 2 years ago

PUSH and POP operations specify how data is stored and retrieved in a stack.

  1. PUSH: PUSH specifies that data is being “inserted” into the stack.
  2. POP: POP specifies data retrieval. It means that data is being deleted from the stack.