How is push()ing and pop()ping defined?

Posted by Helper Method on Stack Overflow See other posts from Stack Overflow or by Helper Method
Published on 2010-05-10T17:59:34Z Indexed on 2010/05/10 18:04 UTC
Read the original article Hit count: 150

Filed under:
|

I know how the push() and pop() methods in a typical implementation of a Queue/Linked List work but what I do want to know is what you actually define as a push or a pop? When can you name a method push()/pop()? What makes the insert()/add() method in a typical Tree implementation not a push()?

My understanding is that push()ing means putting something to a position some special pointer is pointing to, and pop()ping an element means putting some object away some pointer is pointing to, but it doesn't seem to be clearly defined. Or does the naming matter at all?

© Stack Overflow or respective owner

Related posts about data-structures

Related posts about definition