Advertisement
6_2008-2009 Data Structures #208939

DFS (Data and File structure) Programs

Data and File structure Programs Program Set 1 ------------------------------------------------- 1. Perform the following operations on an array: (a) insert (b) delete (c) merge (D) Delete multiple occurrences of a number ------------------------------------------------- 2. Create a stack using static memory allocation ------------------------------------------------- 3. Create a queue using static memory allocation ------------------------------------------------- 4. Create a circular queue ------------------------------------------------- 5. Create a singly linked list and perform the following operations: (a) insert (b) delete (c) merge (d) sort (e) union (f) intersection (g) reverse ------------------------------------------------- 6. Create a stack using dynamic memory allocation ------------------------------------------------- 7. Create a queue using dynamic memory allocation ------------------------------------------------- 8. Represent a polynomial in terms of a singly linked list, and then add two three variables polynomials ------------------------------------------------- 9. Create a doubly linked list ------------------------------------------------- 10. Create a circular linked list ------------------------------------------------- 12. Create a double-ended queue (Dequeue) with the following operations: (a) insert in the beginning (b) insert in the end (c) delete from beginning (d) delete from end Hint: Use doubly-link list ------------------------------------------------- 13. Create a Priority Queue with the following operations: (a) Insert (b) DeleteMin() / deleteMax---depending on the heap ------------------------------------------------- Program Set 2 ------------------------------------------------- 1.Trace the following set of nos using quick sort and bubble sort. Which of the sorting method is more efficient? 9, 11, 1, 5, 10, 45, 3, 8, 18 ------------------------------------------------- 2. Code for finding a no in a binary search tree and displaying its level where it is found (root is at zero level) ------------------------------------------------- 3. Code for traversing a binary tree in inorder iteratively ------------------------------------------------- 4. Code for interchanging the left and right subtrees of a binary tree ------------------------------------------------- 5. Code for counting the leaves(node having no subtree) of the tree Note: Q-2 to Q-5 are to be implemented practically also. ------------------------------------------------- 6. Heap Sort -------------------------------------------------

AI

Résumé par IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Code source
original-source
Upload
Commentaires originaux (3)
Récupéré via Wayback Machine