Sie sind auf Seite 1von 4

DATA AND FILE STRUCTURES

CODE: 152 PRACTICAL FILE

Submitted to: Mrs. Shalini Singh Jaspal

Submitted by: Himani Arora 05225304413

S.NO 1.

2.

3.

4.

TOPIC Implement the data structure Doubly Linked List. Provide C functions for the following operations: Append: adds a node at the end of the list Get by data (A variation of traverse): searches for a data value in the list Get by position: returns pointer to ith node of the list (based upon sequence) addAtPosition: adds a node at a specified position in the linked list addInAscendingOrder: ads a node on basis of data value in ascending order deleteByPosition: deletes a node from a specified position in the linked list deleteByDataValue: Delete the node containing a data value Use your library for linked list to implement a Linked Stack. Provide the following operations for the stack: init isEmpty isFull push pop peek Use your library for linked list to implement a Linked Queue. Provide the following operations for the Queue: init isEmpty isFull enqueue dequeue Implement the following operations on a polynomial using linked list: addTerm display evaluate Implement the add operations on two polynomials.

PAGE NO.

SIGN

5.

6.

7.

Implement the following operations for a static stack (implemented using arrays): 1. init 2. isEmpty 3. isFull 4. push 5. pop 6. peek Implement the following operations for a static queue (implemented using arrays): 1. init 2. isEmpty 3. isFull 4. enqueue 5. dequeue Implement the following operations using stacks 1. Convert an expression from infix to postfix 2. Evaluate a postfix expression Implement the following operations on a BST: 1. Add a node 2. Delete a node 3. Search for a key 4. Print the keys in (use recursion): a. Pre-order b. In-order c. Post-order 5. Find the height of the tree 6. Count the number of nodes in the tree 7. Count the number of leaves in the tree 8. Clone the tree Implement the following: 1. Build an expression tree from an expression give in postfix form 2. Generate the expression in the following notations a. Infix (remember to add parenthesis) b. Prefix c. Postfix 3. Evaluate the expression

8.

9.

10.

Implement the following: 1. Add a node to a Right in-threaded tree. 2. Traverse the tree non-recursively in in-order Implement and compare the running time of following algorithms for a large data set: a. Bubble Sort b. Selection Sort c. Insertion Sort d. Shell Sort e. Heap Sort f. Radix Sort g. Merge Sort h. Quick Sort Provide the following operations for a graph using the adjacency matrix representation: (i) Add a Vertex (ii) Add an Edge (iii) Remove a Vertex (iv) Remove an Edge (v) Generate Adjacency List for a given node (vi) Calculate in-degree (vii) Calculate out-degree (viii) DFS Traversal (ix) BFS Traversal

11.

12.

Das könnte Ihnen auch gefallen