Questions
Download PDF
Free download in PDF Trees Objective Type Questions and Answers for competitive exams. These short objective type questions with answers are very important for Board exams as well as competitive exams. These short solved questions or quizzes are provided by Gkseries.
21
The minimum number of elements in a heap of height h is
A
2h+1
B
2h
C
2h -1
D
2h-1
View Answer
22
In which of the following tree, parent node has a key value greater than or equal to the key value of both of its children?
A
Binary search tree
B
Threaded binary tree
C
Complete binary tree
D
Max-heap
View Answer
Advertisement
23
A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is
View Answer
24
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 the node in the left sub-tree and right sub-tree of the root, respectively, is
A
(4, 7)
B
(7, 4)
C
(8, 3)
D
(3, 8)
View Answer
25
Height of Height of a binary tree is
A
MAX( Height of left Subtree, Height of right subtree)+1
B
MAX( Height of left Subtree, Height of right subtree)
C
MAX( Height of left Subtree, Height of right subtree)-1
D
None
View Answer
Answer: MAX( Height of left Subtree, Height of right subtree)+1
26
Postfix expression for (A+B) *(C+D) is
A
A B C * + D +
B
A B + C D + *
C
ABCD++*
D
None
View Answer
27
True statements about AVL tree are
A
It is a binary search tree
B
Left node and right node differs in height by at most 1 unit
C
Worst case time complexity is O(log2n)
D
All above
View Answer
28
Which of the following statements is false ?
A
Every tree is a bipartite graph
B
A tree contains a cycle
C
A tree with n nodes contains n-1 edges
D
A tree is a connected graph
View Answer
Answer: A tree contains a cycle
29
A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is called
A
Full binary tree
B
Binary Search Tree
C
Threaded tree
D
Complete binary tree
View Answer
Answer: Complete binary tree
30
Which of the following remarks about Tree- indexing are true?
A
It is an m-ary tree
B
Successful searches should terminate in leaf nodes
C
Unsuccessful searches may terminate in leaf nodes level of the tree structure
D
All of these
View Answer
31
A complete binary tree with the property that the value at each node is at least as large as the values at its children is called
A
binary search tree
B
Binary Tree
C
Completely balanced tree
D
Heap
View Answer
32
A full binary tree with n leaves contains
A
n nodes
B
log2n nodes
C
2n - 1 nodes
D
2n+1 nodes
View Answer
33
A Binary Tree can have
A
Can have 2 children
B
Can have 1 children
C
Can have 0 children
D
All
View Answer
34
A threaded binary tree is a binary tree in which every node that does not have right child has a thread to its
A
Pre-order successor
B
In-order successor
C
In-order predecessor
D
Post-order successor
View Answer
Answer: In-order successor
35
The maximum number of elements in a heap of height h is
A
2h+1 -1
B
2h
C
2h -1
D
2h -1
View Answer
36
If n elements are sorted in a binary search tree. What would be the asymptotic complexity to search a key in the tree?
A
O(1)
B
O(logn)
C
O(n)
D
O(nlogn)
View Answer
37
If n numbers are to be sorted in ascending order in O(nlogn) time, which of the following tree can be used
A
Binary tree
B
Binary search tree
C
Max-heap
D
Min-heap
View Answer
38
In a full binary tree, every internal node has exactly two children. A full binary tree with 2n+1 nodes contains
A
n leaf node
B
n internal nodes
C
n-1 leaf nodes
D
n-1 internal nodes
View Answer
39
In full binary search tree every internal node has exactly two children. If there are 100 leaf nodes in the tree, how many internal nodes are there in the tree?
View Answer
40
The no of external nodes in a full binary tree with n internal nodes is?
View Answer
Random GK Questions