QB2 dsa
QB2 dsa
QB2 dsa
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
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.
12. Construct a Optimal Binary tree for the given values below :-
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