Data Structures Laboratory
Data Structures Laboratory
1. Write a program to implement quick sort and sort the names of n students of ABC university. (use alphabets only in names). 2. Implement an algorithm following the divide and conquer strategy to compute the convex hull of a set of n previously sorted points. 3. Write non recursive functions to sort n numbers using quick sort. Use a main function to invoke all the sub functions. 4. Write a program to implement quick sort by choosing the pivot element randomly and sort n numbers. 5. Devise a program to construct a Trie data structure with strings as input and perform the following operations a. Insertion b. Deletion 6. Develop a program for implementing a max heap data structure and perform search operation. 7. Develop a program for implementing a min heap data structure. Perform the following operations: a. Insert a node b. Delete a node 8. Develop a program for implementing a min heap data structure. Perform search operation. 9. Develop a program for implementing a Deap data structure. Perform the following operations: a. Insert a node b. Delete a node 10. Develop a program for implementing a Deap structure. Perform search operation. 11. Develop a program for implementing a Leftist tree data structure. Perform the following operations: a. Insert a node b. Delete a node 12. Develop a program for implementing a Leftist tree data structure. Perform search operation. 13. Develop a program for implementing a B-tree data structure. Perform the following operations: a. Insert a node b. Delete a node 14. Develop a program for implementing a B-tree data structure. Perform search operation. 15. Develop a program for implementing a Trie data structure. Perform the following operations: a. Insert a node b. Delete a node 16. Write to program to construct a binary min heap and perform percolate up and deleteMin operations. 17. Develop a program for implementing a Trie data structure. Perform search operation. 18. Develop a program using non recursive functions to sort an array of N numbers using quick sort.
19. Given a knapsack with maximum capacity W and a set S consisting of n items, each item i has some weight wi and benefit value bi (all wi, bi and W are integer values). The problem is how to pack the knapsack to achieve maximum total value of packed items. Develop a program to implement the above. (0-1 Knapsack problem) 20. Develop a program to perform breadth first search traversal and depth first search traversal on a graph. 21. Develop a program for graph colouring using backtracking. 22. Develop a program to implement the Quick Hull algorithm to compute the convex hull of a set of sorted points. 23. Write to program to implement a binary min heap and use it to sort the given numbers. 24. Write a program to implement a binary min heap and perform the following operations a. Delete the minimum element. b. Search if x is contained in the heap c. Print the elements of heap. 25. Develop a program for implementing a complete binary tree data structure. Perform the following operations: a. Pre-order traversal b. In-order traversal c. Post-order traversal 26. Develop a program for implementing a binary search tree data structure. Perform the following operations: a. a.Insert a node b. b.Delete a node 27. Develop a program for implementing a binary search tree data structure. Perform the following operations: a. Insert a node b. Search a node c. Find and print the minimum element present in the tree 28. Write a program to implement Graph coloring algorithm using backtracking. 29. Generate Huffman codes for the given frequency of characters using binary min heap. A:5 B:8 C:2 D:10 E:4 30. Write a program to implement a deap data structure and perform the following operations a. Insertion of n elements b. Insert an element x if it is not contained already c. Print the elements 31. Devise a program to construct a leftist heap and perform the following operations a. Insertion into an initially empty leftist heap b. Search 32. Write functions to create and initialize two height biased leftist heaps and merge them. Use a main function to invoke the sub functions. 33. Write a program to implement AVL tree with single rotations and perform the following operations
a. Insertion with AVL single rotations b. Display the elements Write a program to insert n numbers using AVL single rotations into an initially empty AVL tree. Write the necessary recursive functions to perform search operation. Write a program to construct a B-tree and perform Insertion and Search operations. Devise a program to construct a B-tree and perform the following operations a. Insertion b. Node Split Implement the incremental algorithm to compute the convex hull of a set of points in the plane, previously sorted by their abscissae. Write a program to implement 0/1 knapsack using dynamic programming. Develop a program for implementing an AVL tree data structure. Perform the following operations: a. Insert a node b. Delete a node