Stacks
Activity Outcomes:
This lab teaches you the following topics:
Introduction
A stack is a special case of a singly-linked list which works according to LIFO algorithm. Access is restricted to one end, called the top of the stack. A stack may be depicted as given in the figure below . Its operations are:

Â
push − push an element onto the top of the stack
pop − pop an element from the top of the stack
top − retrieve the element at the top of the stack;
delete − delete the whole stack.
This can be done as explained in the pervious paragraph.
Lab Activities:
Activity 1
Write a function that checks whether parentheses in a mathematical expression are balanced or not.
Activity 2
Write a function that converts a mathematical expression with no parentheses from infix form to postfix form
Activity 3
Write a function that converts an expression from infix form to prefix form.
Activity 4
Write a function that converts a mathematical expression containing parentheses from infix form to postfix form
Related linksÂ
Single link list         Stack        AVL Trees       Binary search      Counting Sort
Doubly link list        Queue        Graphs         Bubble Sort        Radix sort
Circular link list        Binary search tree    Hashing     Insertion Sort     Bucket Sort
Josephus Problem      Tree Traversal        Heaps         Quick Sort       Merge Sort
At Cui tutorial, courses, past papers and final year projects
#tutorial #cui #pastpaper #courses