Data Structure Test Set 1

Data Structure Test Set 1

Q1➡ |
A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is
i āž„ Log2n
ii āž„ n-1
iii āž„ n
iv āž„ 2n

Q2➡ |
In the balanced binary tree in the below figure, how many nodes will become unbalanced when a node is inserted as a child of the node ā€œgā€?
5.	In the balanced binary tree in the below figure, how many nodes will become unbalanced when a node is inserted as a child of the node ā€œgā€?
i āž„ 1
ii āž„ 3
iii āž„ 7
iv āž„ 8

Q3➡ |
Which of the following sequences denotes the post order traversal sequence of the given tree?
5.	In the balanced binary tree in the below figure, how many nodes will become unbalanced when a node is inserted as a child of the node ā€œgā€?
i āž„ f e g c d b a
ii āž„ g c b d a f e
iii āž„ g c d b f e a
iv āž„ f e d g c b a

Q4➡ |
A binary search tree is generated by inserting in order the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively is
i āž„ (4, 7)
ii āž„ (7, 4)
iii āž„ (8, 3)
iv āž„ (3, 8)

Q5➡ |
A binary search tree is used to locate the number 43. Which one of the following probe sequence is not possible?
i āž„ 61, 52, 14, 17, 40, 43
ii āž„ 10, 65, 31, 48, 37, 43
iii āž„ 81, 61, 52, 14, 41, 43
iv āž„ 17, 77, 27, 66, 18, 43

Weekly Test GATE/NTA NET CSA

3 thoughts on “Data Structure Test Set 1”

Leave a Reply

Your email address will not be published.

error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?