Please enable JavaScript.
Coggle requires JavaScript to display documents.
STACKS (APPLICATIONS (Expression evaluation, Backtracking, Expression…
STACKS
APPLICATIONS
-
-
-
The simplest application of a stack is to reverse a word. You push a given word to stack - letter by letter - and then pop letters from the stack.
Another application is an "undo" mechanism in text editors; this operation is accomplished by keeping all text changes in a stack.
-
-
-
OPERATIONS
peek() − get the top data element of the stack, without removing it.
-
-
-
-
-
IMPLEMENTATION
USING LINKED LISTS
-
Step 4: Implement the main method by displaying Menu with list of operations and make suitable function calls in the main method.
-
Step 1: Include all the header files which are used in the program. And declare all the user defined functions.
USING ARRAYS
-
-
-
Step 5: In main method display menu with list of operations and make suitable function calls to perform operation selected by the user on the stack.
Step 1: Include all the header files which are used in the program and define a constant 'SIZE' with specific value.
-
-
-
-
-
-
-
-