Small Basic: Stack Basics - Featured Article

I'd like to introduce you to LitDev's article here:

Small Basic: Stack Basics

  

Here is an excerpt:

 

What is a Stack

A stack is an ordered list where entries are added (pushed) and retrieved (popped) in a last-in first-out order.  The name stack come from the fact that it is like a stack of plates.  When we add a plate it goes on the top and when we remove a plate it is the last one added that is removed.

A stack is useful to store things that we want process gradually as we unwind the stack, retrieving things to process.  Often the things to add to the stack are not known at the start, but are the result of processing previous stack values.  If we knew them all at the start we could just put them in an array.

 

======================== 

 

Go check out the full article on TechNet Wiki!

Small Basic: Stack Basics

  

Thanks to LitDev for providing us with this direct and clear explanation!

   - Ninja Ed