[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
stack

(Computer science) Stack

A data structure where data can only be taken off or placed on the "top" of the stack. It's a bit like a stack of books, you can only take one off the top or put another on the top, you can't remove any others or insert any others somewhere else (well, you could, but that'd spoil the analogy). Stacks are FILO (First In, Last Out) data structures.

We can simulate a stack using an array and a pointer which specifies which element of the array is the current top of the stack.

When data is put on the stack, we call this operation a push. When data is taken off the stack, we call this operation a pop. So, we push on and pop off.

'Stack' links



last edited (November 2, 2006) by bilderbikkel, Number of views: 5371, Current Rev: 5 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.