Stack: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


A '''stack''' is a [[Data_Structures#Dynamic_Set|dynamic set]] in which the the [[Data Structures#DELETE|DELETE]] operation, which does not have any argument, removes the most recently inserted element. The stack has a ''last-in-first-out'', or LIFO policy. Also see [[Queue#Overview|Queue]].
A '''stack''' is a [[Data_Structures#Dynamic_Set|dynamic set]] in which the the [[Data Structures#DELETE|DELETE]] operation, which does not have any argument, removes the most recently inserted element. The stack has a ''last-in-first-out'', or LIFO policy. Also see [[Queue#Overview|Queue]].
The [[Data Structures#INSERT|INSERT]] operation for a stack is called PUSH. The [[Data Structures#DELETE|DELETE]] operation is called POP.

Revision as of 01:16, 11 August 2018

Internal

Overview

A stack is a dynamic set in which the the DELETE operation, which does not have any argument, removes the most recently inserted element. The stack has a last-in-first-out, or LIFO policy. Also see Queue.

The INSERT operation for a stack is called PUSH. The DELETE operation is called POP.