0% found this document useful (0 votes)
108 views3 pages

Dsa Question Bank Module-4

The document is a master question bank for a module on data structures, specifically focusing on binary search trees, graph representations, and tree operations. It includes questions on defining binary search trees, constructing various tree types, implementing search algorithms, and traversing forests and graphs. Additionally, it covers topics such as disjoint sets, graph traversal methods, and tree construction from traversal data.

Uploaded by

vizard.viz.0017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views3 pages

Dsa Question Bank Module-4

The document is a master question bank for a module on data structures, specifically focusing on binary search trees, graph representations, and tree operations. It includes questions on defining binary search trees, constructing various tree types, implementing search algorithms, and traversing forests and graphs. Additionally, it covers topics such as disjoint sets, graph traversal methods, and tree construction from traversal data.

Uploaded by

vizard.viz.0017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MASTER QUESTION BANK MODULE-4

1. Define Binary search tree. Draw the BST for the following input: 14, 15, 4, 9, 7, 18, 3, 5, 16,
20, 17, 9. Also, Develop a search function in C to search a key value in that tree

2. Write the iterative search and Recursive search algorithm for a Binary Search Tree?

3. Write the routines for:

a) Copying binary tree

b) testing equality of binary trees

4. Write a C function to insert an element in a BST.

5. What is a selection tree? Explain its types with an example?

6. Construct a Winner Tree and loser tree for the following data?

10 9 20 6 8 9 90 17

15 20 20 15 15 11 95 18

16 38 30 25 50 16 99 20

Run1 Run2 Run3 Run4 Run5 Run6 Run7 Run8

7. What is a forest? Traverse the following forest in preorder, postorder and inorder

8. Explain the following representation of graph using:

1) Adjacency list

2) Adjacency Matrix

3) Multilist

9. What are disjoint sets? How to represent disjoint sets? Explain different operations
performed on disjoint sets with an example?

10. Define the following terminologies with an example:

a) digraph

b) weighted graph
c) self loop

d) Complete graph

e) Simple Path

f) length of the path

g) cycle

h) Connected Graph

i) Spanning Tree

j) BiConnected graph

k) Disconnected graph

11. What are the methods used for traversing a graph. Explain any one with example and
write function for same?

12. Interpret the Breadth-First-Search (BFS) and Depth-First-Search(DFS) for the following
graph given below

13. Draw a binary search tree for the following input of elements 40 10 79 90 12 54 11 9 50
and also write a Recursive Search function for Binary Search tree

14. Construct a Binary tree by using the following in-order and preorder traversal

Inorder: BCAEDGHFI

Preorder: ABCDEFGHI

15. Write a function to perform Delete from BST and Insert an element into BST and explain
with example

16. Construct a Binary tree by using the following in-order and preorder traversal

Inorder: 42516738

Preorder: 45267831

17. Write a function to find:

i) Maximum element in BST

ii) Minimum element in BST


iii) Height of BST

iv) Count the no of nodes in BST

v) count the no of leaf nodes in BST

18. Write short notes on:

i) Transforming a Forest into a Binary Tree

ii) Forest Traversals

iii) Selection Trees

iv) Array and linked representation of binary trees

19. Construct a Binary tree by using the following in-order and preorder traversal

Inorder: EACKFHDBG

Preorder: FAEKCDHGB

also perform postorder traversal of the obtained tree

You might also like