Bannari Amman Institute of Technology
Bannari Amman Institute of Technology
Bannari Amman Institute of Technology
List of experiments:
1. Program to Solve Tower-of-Hanoi Problem using Recursion
2. a) Write a C program to implement a Stack ADT using array and write the routine for
push operation which represent a function PUSH(X, S), Check for the condition
whether S-full or not, if yes display the message otherwise insert the elements into the
Stack. Perform POP operation which represents a function POP(S), Check for the
condition whether S-Empty, if stack is empty, display the message otherwise delete an
element from the Stack. Test your program with at least 5 elements and provide the
output.
b) Write a C program to implement the Queue ADT using array and write the routine
to enqueue an element X into queue, Check for the conditions Q-full, if yes display
the message otherwise insert the data into the queue and dequeue an element from
queue, check for the conditions Q-empty, if yes display the message otherwise
deleting the element from the queue and display the elements from the Queue ADT.
Test your program with at least 6 elements and provide the output
5. Write a function program to perform the following operations on a doubly linked list
i. Create a list
ii. Insert an element to the list
iii. Delete the maximum element from the list
iv. Arrange the list as sorted order
v. Display the elements of the list
Write a main method to demonstrate the above functionalities.
6. Program to sort the elements in ascending order using selection sort and bubble sort
11. Program to construct an expression tree for a given expression and perform various
tree traversal methods.