July 2010
Intermediate to advanced
576 pages
11h 57m
English
Stack data structure is exclusively discussed in this chapter. Representation and implementation of stacks are explained along with examples. Four of the common applications are stated and illustrated in detail.
A stack is a linear data structure in which insertion and deletion of elements are done at only one end, which is termed as Top of stack. The last element that is inserted will be the first element to be deleted. Therefore, this is referred to as a Last In First Out (LIFO) structure.
Examples
Let ST be a stack with elements 10, 20, 30. The element 30 is pointed by the top. When the new element 40 is to be added, it is inserted at the ...
Read now
Unlock full access