Unit Wise Important Questions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Subject Name :Data Structures Departmen:IT

Questions Bank

Unit-1

1. Define Recursion with example


2. Differentiate between linear search and binary search
3. Write a recursive procedure to compute the nth Fibonacci number.
4. Write a recursive function to find factorial of a given number.
5. Explain radix sort with an algorithm. Discuss on its time complexity.
6. Write an algorithm to implement Binary Search technique. Use the algorithm
to search 32 in the following list of elements. Explain the process at each step.
7. 12, 16, 17, 19, 20, 22, 24, 29, 30, 32, 37
8. Explain Divide and Conquer algorithmic strategy using Merge Sort as an
example.
9. Sort the following list of elements by using bubble sort
16, 23, 19, 6, 20, 10, 34, 54
10. Construct the binary search tree for the following list of elements
40, 21,57, 34, 90, 25, 11, 68

Unit-2

1. List out the applications of stack. Consider the usual algorithm for determining
2. whether a sequence of parentheses is balanced. What is the maximum number
of parentheses that will appear on the stack AT ANY ONE TIME when the
algorithm analyzes: ( ( ) ( ( ) ) ( ( ) ) )?
3. Write an algorithm for Quick sort and also analyze the time complexity
4. Sort the following numbers using Quick sort
45, 34, 12, 46, 27, 56, 11, 87, 6, 33, 28
5. Write an algorithm for merge sort and also analyze the time complexity
6. Write an algorithm for heap sort and also analyze the time complexity.
7. Discuss about the stack with examples
8. Write an algorithm for infix to postfix conversion.
9. Arrange the list of elements in ascending order using quick sort 45, 26, 31, 55,
77, 24, 42, 63, 99, 22, 88, 72 ? Write the value of left pointer l, right pointer r
and pivot at each step and also draw the current scenario after each step?
10. Discuss about the transformation from infix to postfix.
Unit-3

1. How to represent Queues? Discuss.


2. Write a short note on circular linked list.
3. Explain about the operations on a singly linked list.
4. What are the operations of a singly linked list? Discuss.
5. Write an algorithm to sort the elements in a linked list.
6. Explain about the insert and delete operations in a singly linked list.
7. Write an algorithm to reverse a given linked list.
8. Discuss the advantages and disadvantages of representing a group of items as
an array versus a linear linked list.
9. Write an algorithm to insert a node at the end of a doubly linked list.
10. Explain various operations that are performed on queue with suitable
algorithms.

Unit-4

1. Write algorithms for swapping two successive elements in a singly linked list
with the first element placed at position P.
2. What is a circular linked list? Write an algorithm to merge two circular linked
lists.
3. Discuss post order traversal in a binary tree.
4. What is Threaded binary tree?
5. Write a non recursive algorithm for preorder traversal in a tree with an example.
6. What is a balanced binary tree? How it is different from the BST? Discuss.
7. What is balanced binary tree? What are the applications of it?
8. Write a non recursive algorithm for post order traversal with an example.
9. What is a Binary tree? What are the properties of Binary tree?
10. Write an algorithm for the creation of binary tree using pre-order traversal and In-order
traversal.
11. Write a short note on Balanced Binary Trees. Also discuss on the applications
of Balanced Binary Trees.
12. Find the inorder, preorder and postorder traversals for the given binary tree.
13.

i. How many leaves does it have?


ii. How many of the nodes have at least one sibling?
iii. List out the nodes that are siblings to node 5?
iv. How many descendants does the root have?
v. What is the depth of the tree?
vi. How many children does the root have?
vii. "Is it a complete binary tree" – Justify
14. Define threaded binary tree. Explain inorder threading using suitable example.
15. Discuss advantages of the threaded binary tree.
16. Define the following terms with suitable examples
i. Binary Tree
ii. Strictly Binary Tree
iii. Complete Binary Tree
iv. Almost Complete Binary Tree

Unit-5

1. Explain about adjacency matrix with example.


2. Discuss about any one shortest path algorithm.
3. Differentiate between DFS and BFS.
4. How to represent graphs? Explain.
5. Discuss about Warshall’s algorithm with example
6. What is BFS? Which traversing technique is used in BFS and also explain the concept of
BFS with example.
7. What is a Graph? How graphs can be represented? Discuss.
8. Explain about the prim’s algorithm with example.
9. What are connected components of a graph? Is there a method to find out all
the connected components of a graph? Explain.
10.

11. What is a sparse matrix? Write an algorithm for finding the transpose of a
sparse matrix.
12. Write an algorithm of dijkstra’s shortest path

You might also like