A stack is a one-dimensional data structure to which new members or elements are generally added (pushed) at the end and removed (popped) from the start. (Compare this to a queue).
Obviously a new pushed element gets an index number one higher than the most recently pushed element. Whether the actual implementation puts the first element at the highest memory address available for the stack (and decreases the stack pointer with each push) or the lowest (and increases the stack with each push) there is no need to re-index elements as might be the case with a queue.
|Date of creation||2013-03-22 16:15:18|
|Last modified on||2013-03-22 16:15:18|
|Last modified by||Mravinci (12996)|