DSA IMP Questions
DSA IMP Questions
1. What is the running time to search an element in a linked list containing n number of nodes?
2. List the advantages of Linked stack over Linear stack.
3. Why is a single-linked list called a one-way list whereas a double-linked list is called a two-way list?
4. Represent the following polynomial using a linked list:
7x3−5x2+4x+10
5. Write a C function to delete the last node of a double-linked list.
6. Write a C function to traverse a double-linked list in both forward and backward directions.
7. Write a C function to merge two linked lists.
8. Write a C function to insert a new node at any location of a single linked list.
9. Write a C function to delete the last node of a single circular linked list.
11. Write a menu driven program using C to perform the following operations on doubly linked list;
1. Create a list
2. Forward Traverse
Module-4
1. If a directed graph contains 8 vertices then what will be the dimension of its adjacency matrix?
2. What is rotation? What are the different types of rotation techniques used in balancing an AVL tree?
3. Find out whether the following statement is True or False.
The height of any node in a tree is always the same as the depth of that node.
4. Which traversal of any BST arranges the elements in increasing order?
5. Construct a binary tree whose pre-order and in-order traversal results are given below.
Pre-order: A B D E F C G H J L K
In-order: D B F E A G C L J H K
6. Construct a BST with the elements: 100 80 90 120 110 85 35 47 138 190 162 45 135.
After the construction of the BST, delete 120 from the constructed BST. Draw the final BST after the
deletion of 120.
7. Write the Breadth-First-Search (BFS) algorithm to traverse a graph. Find out the BFS traversal result
on the following graph considering node ' B' as the starting node.
8. Write the Depth-First-Search (DFS) algorithm to traverse a graph. Find out the DFS traversal result on
the following graph considering node 'B' as the starting node.