Saturday, February 7, 2009

Things Learned...

STACK
February 7, 2009
7:45 pm

Illustration:

This is an illustration that applied the principle of stack. [Surfdoggy.com]

Definition:

♥ Stack is based on the principle of Last In First Out (LIFO).
♥ It is an abstract data type and data structure.
♥ It is a container of nodes wherein different operations are implemented such as "pop" to get an object out of the stack and "push" to enter an object.
♥ Another helper operations are "top" to identify what is on the top of the stack and "null or isEmpty" to know if there is an object in the stack.
♥ The contents of the stack are hidden.
♥ The top of the stack is visible and accessible to the user, others remain hidden.
♥ As new objects are added, each new object becomes the top of the stack, hiding each object below, pushing the others down. As the top object is removed from the stack, they can be used, the objects pop back up, and the second object becomes the top of the stack.
[WIKI]

Reference:
















1 comment:

  1. It was really hard to find these notions but I did enjoy. Learning is fun!

    ReplyDelete