QB2 dsa

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Question Bank- for II 2

Data Structure and Applications

1. Write C Functions for the following


i) Inserting a node at the beginning of a Doubly linked list
ii) Deleting a node at the end of the Doubly linked list

2. Write C function to
i ) Search an element in the singly linked list
ii) To concatenate of two singly linked list

3. State the advantages of doubly linked list over a Single Linked List and write a c
program for Insertion and deletion of a node on doubly linked list?

4. Develop a Program in C for the following operations on Singly Circular Linked List
(SCLL)with header nodes
a. Represent and Evaluate a Polynomial P(x,y,z) = 6x2y2z-
4yz5+3x3yz+2xy5z-2xyz3
b. Find the sum of two polynomials POLY1(x,y,z) and POLY2(x,y,z)
and store the result in POLYSUM(x,y,z) Support the program with
appropriate functions for each of the above operations

5. Write a recursive c function for inorder, preorder and postorder traversal of a binary
tree. And find the all the traversals for the given tree

6. Draw the expression ab+cd-* Traverse the above generated tree using inorder,
preorder and postorder. Also write C function for each method.

7. Explain binary search tree with its properties and construct the binary search tree for
the following sequence 100, 85, 45, 55, 110, 20, 70, 65

8. What is a tree? With suitable example, define


i) Complete binary tree
ii) Degree of tree
iii) Level of a node
iv) Siblings

9. What is the advantage of the threaded binary tree over a binary tree? For a given tree
write the inorder, preorder and postorder traversals?
10. List and explain the different general representation of a trees.

11. Write Short note on : -


a. Binary tree b. Degree of the tree
c. Leftist Tree d. Priority queues

12. Construct a Optimal Binary tree for the given values below :-

13. Discuss selection trees with example.

14. Design an algorithm to traverse a graph using Depth First Search (DFS). Apply DFS
for the graph given below. Source vertex is 1

15. Define a graph and its traversal methods. List and explain the different graph traversal
methods. Find the resultants of the types of graph traversal methods on the following
graph : (Consider ‘a’ as a starting vertex)

16. Define Hashing. Explain the types of hashing functions in details. Explain how you
resolve the collision problem in Linear probing with an example

You might also like