0% found this document useful (0 votes)
12 views11 pages

Data StructuresQuestion Bank Module 4 Final

Uploaded by

Amen Ahammed T K
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)
12 views11 pages

Data StructuresQuestion Bank Module 4 Final

Uploaded by

Amen Ahammed T K
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/ 11

CST201, Data Structures,

Question Bank for Module 4


Part A - 3 mark questions
Question Mark Bloom’s CO
Question
taxonomy
No
level

1 1.Differentiate between complete binary tree and full binary tree. Give examples 3 2 CO3
for each.

2. Define BST. Give an example. 3 2 CO3

3. Differentiate between binary tree and binary search tree. Give examples 3 2 CO3
for each.

2 1. Write the output of inorder, preorder & postorder traversals on the following
tree.

3 3 CO3
2. Write the output of inorder, preorder & postorder traversals on the following
tree.

3 3 CO3

3. Write the output of inorder, preorder & postorder traversals on the following
tree.

3 3 CO3

3 1. Write a recursive algorithm for preorder traversal in a binary tree. Give an example. 3 2 CO3

2. Write a recursive algorithm for postorder traversal in a binary tree.Give an example. 3 2 CO3
3. Write a recursive algorithm for inorder traversal in a binary tree.Give an example. 3 2 CO3

4 1. Create a Binary Search Tree for the following values 62, 14, 96, 12, 105, 3, 75,
3 3 CO3
22, 87, 32, 20, 13, 102, 68, 125.

2. Create a Binary Search Tree for the following values 73, 25, 98, 23, 108, 9, 75,
3 3 CO3
22, 87, 32, 20, 13, 109, 66, 120.

3. Create a Binary Search Tree for the following values 72, 25, 109, 24, 115, 13, 85,
3 3 CO3
33, 89, 42, 26, 31, 112, 67, 128.

5 1. Give the array representation of the binary tree.

3 2 CO3

2. Draw the tree structure whose array representation is given:


3 2 CO3
3. Give the array representation of the binary tree.

3 2 CO3

6 1.Define graph. Explain any one graph representation method with examples. 3 2 CO3

2. Define graph. Explain the linked representation method with examples. 3 2 CO3

3. Define graph. Explain the sequential representation method with examples. 3 2 CO3

Part B - 14 mark questions


Questio Question Mark Bloom’s CO
n No Taxonomy
level
1.a Give recursive algorithms for all three traversals on a binary tree. Illustrate the CO3
7 algorithms using the given example.

3
1.b Explain the term Complete Graph with an example. 5

2.a Explain the recursive algorithms for the Inorder, Preorder, Postorder traversals of
the given tree.

8
2.b What is a complete graph? Find out the number of edges in a complete graph with
6
5 nodes.

3.a Write recursive algorithms for all three traversals on a binary tree. Illustrate the
algorithms using the given example.

3. b Explain the following terms using examples with respect to graph:


1. Degree of a graph 5
2. Complete Graph

1 a. How to represent a binary tree using Arrays ? Construct a binary tree from the
8 following elements arranged in an array A[1:15] as:

10

1.b Explain any two properties of the Binary tree with the help of an example. 4

2.a How to represent a binary tree using Arrays ? Construct a binary tree from the
10
following elements arranged in an array A[0:14] as:
2 b. Prove any two properties of the Binary tree with the help of an example. 4

3 a. How to represent a binary tree using Arrays ? Construct a binary tree from the
following elements arranged in an array A[1:15] as:
10

3 b. Using an example prove any two properties of the Binary tree. 4

1a.Write an algorithm to insert an element to a binary search tree. Explain with


10
9 an example.

1b. Write the post order traversal of a BST whose pre order traversal is 15, 10, 8, 12,
4
20, 16, 25.

2a. What is a Binary Search Tree (BST)? Show the creation of the binary search tree
after adding each of the following values in order: 8, 3, 10, 1, 6, 14, 4, 7, 13. 10
Show the steps for deleting the value 10 from the above resultant tree. 3 CO3
2b. Create the BST and write the post order traversal whose pre order traversal is 15,
4
10, 8, 12, 20, 16, 25.

3a. Show the structure of the binary search tree after adding each of the following
values in that order: 2, 5, 1, 7, 10, 9, 11, 6. What is the height of the created 10
tree?
3b. Create the BST and write the post order traversal whose pre order traversal is 25,
4
20, 18, 22, 30, 26, 35.

1a. Write an algorithm to delete a node from a Binary Search Tree. Illustrate each
14
10 case with an example.

2a. Write an algorithm to delete a leaf node from a Binary Search Tree. Illustrate it
10
with an example.

2b. Write an algorithm to find the Inorder Successor of a node in a BST. 4

3a. Write an algorithm to delete an intermediate node with two children from a Binary
10
Search Tree. Illustrate it with an example.

3b. Explain Inorder Successor of a node in a BST with example. 4

1 a. Explain BFS with the help of an algorithm/pseudo code. Perform BFS on the
11 given graph, starting from node ‘C’ and follow chronological order.

10

1 b. List out any four applications of graphs in computer science. 4 3 CO3

2a. Write an algorithm to perform DFS in a graph.Perform DFS on the given graph,
10
starting from node 0 and follow numerical order.
2.b With the help of examples, explain the use of graph in computer science. 4

3.a write algorithms to perform DFS and BFS on the given graph. Illustrate the
algorithms on the following graph, starting from node ‘C’ and follow chronological
order.

14
1a. Write an algorithm to insert a new element to the existing BST. Consider the
12 following tree and show the steps to insert 68 to this BST.

10

1.b Prove that insertion of a new node to a BST runs in O(log N). 4

2 a. Write an algorithm to insert a new element to the existing BST. Consider the
following tree and show the steps to insert the following numbers to the tree. 14
28, 42, 72.
3.a Write an algorithm to insert a new element to the existing BST. Show the steps to
10
insert 35 to an existing BST with data members 15,40,32,12.

3.b With the help of an example prove that searching in a BST runs in O(log N).
4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy