AIGS DS LAB PROGRAMS LIST
AIGS DS LAB PROGRAMS LIST
PART-A
A1. Given {4, 7, 3, 2, 7, 7, 9, 0} find the location of 7 using Binary search and also display its
first occurrence.
A2. Given {5, 3, 1, 6, 0, 2, 4} order the numbers in ascending order using quick sort.
A3. Perform the Merge sort on the input {75, 8, 1, 16, 48, 3, 7, 0} and display the output in
descending order.
A4. Write a program to insert the elements 6l, l6, 8, 27 into singly linked list and delete 8, 61,
27 from the list. Display your list after each insertion and deletion.
A5. Write a program to add 6x3 + 10x2 + 0x + 5 and 4x2 + 2x + l using linked list.
A6. Write a program to push 5, 9, 34, 17, 32 into stack and pop 3 times from the stack, also
display the popped numbers.
PART-B
B1. Write a program to inert the elements {5, 7, 0, 6, 3, 9} into circular queue and delete 6, 9
and 5 from it (using linked list implementation).
B5. Write a program to create a binary tree with the elements 18, 15, 40, 50, 30, 17, 41 after
creation insert 45 and 19 into tree and delete 15, 17 and 4l from tree. Display the tree on
each insertion and deletion operation.
B6. Write a program to create binary search tree with the elements {2, 5, 1, 3, 9, 0, 6} and
perform inorder, preorder and post order traversal.
B7. Write a program to Sort the following elements using heap sort {9, 16, 32, 8, 4, 1, 5, 8, 0}