If you’re learning about trees in data structures, practicing Tree data structure mcqs is a great way to test your knowledge. Trees are an important part of computer science, used in databases, networking, and search algorithms. These MCQs cover essential topics like binary trees, tree traversals, height, depth, and balanced trees. Whether you’re a student preparing for exams or a programmer brushing up on concepts, these questions will help you understand the fundamentals. By solving these mcqs, you can improve your problem-solving skills and get a better grasp of this crucial topic.
Tree Data Structure MCQs
- The number of edges from the node to the deepest leaf is called of the tree
(a) Height
(b) Depth
(c) Length
(d) Width
(a) Height
- What is a full binary tree?
(a) Each node has exactly zero or two children
(b) Each node has exactly two children
(c) All the leaves are at the same level
(d) Each node has exactly one or two children
(a) Each node has exactly zero or two children
- What is a complete binary tree?
(a) Each node has exactly zero or two children
(b) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left
(c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
(d) A tree In which all nodes have degree 2
(c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
- State true of false.i) A node is a parent if it has successor nodes.i) A node is child node if out degree is one.
(a) True, True
(b) True, False
(b) False, True
(c) False, False
(b) True, False
- How many types of insertion are performed in a binary tree?*
(a) 1
(b) 2
(c) 3
(d) 4
(b) 2
- The node which has no children is called as
(a) Root Node
(b) Leaf Node
(c) Parent Node
(d) Internal Node
(b) Leaf Node
- The children of same parent node is called as:
(a) Siblings
(b) Parent Node
(c) Root Node
(d) None
(a) Siblings
- The tree which has n vertices, then how many edges are there?
(a) n-1
(b) n-2
(c) n
(d) n2
(a) n-1
- In a skewed binary tree, all nodes except one have only one child node. The remaining node has no child
(a) True
(b) False
(a) True
- A Tree is:
(a) Linear Data Structure
(b) Non Linear Data Structure
(b) Non Linear Data Structure
- Which of the following statement is not true?
(a) A tree contains a cycle
(b) A tree is a connected graph
(c) A tree with n nodes contains n-1 edges
(d) None
(a) A tree contains a cycle
- The number of edges from the root node to the deepest leaf is called of the tree.
(a) Height
(b) Depth
(c) Length
(d) Width
(a) Height
- Which of the following statement about binary tree is True?
(a) Every binary tree is either complete or full
(b) Every Complete binary tree is also a full binary tree
(c) Every full binary tree is also a complete binary tree
(d) A binary tree cannot be both complete and full
(c) Every full binary tree is also a complete binary tree
- Which of the following traversal technique outputs the data in sorted order in a Binary Search Tree (BST) ?
(a) Preorder
(b) Inorder
(c) Postorder
(d) Level order
(b) Inorder
- Which of the following tree traversal technique visits root node last?
(a) Preorder
(b) Inorder
(c) Postorder
(d) Level order
(c) Postorder
- Which of the following is not a height balanced tree?
(a) AVL Trees
(b) Binary Heap Tree
(c) BST
(d) None Of The Above
(c) BST
- What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
(a) O(logn) for both insertion and deletion
(b) O(n) for both insertion and deletion
(c) O(n) for insertion and O(logn) for deletion
(d) O(logn) for insertion and O(n) for deletion
(b) O(n) for both insertion and deletion
- A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is
(a) log2n
(b) n-1
(c) n
(d) 2n
(b) n-1
- Which of the following is not an advantage of trees?
(a) Hierarchical structure
(b) Faster search
(c) Router algorithms
(d) Undo/Redo operations ia notepad
(d) Undo/Redo operations ia notepad
- In full binary tree ij number of internal nodes isL,then number of nodes Nare?
(a) N = 2*1
(b) N =I+1
(c) N =1-1
(d) N 2*1 +1
(d) N 2*1 +1
- What is a complete binary tree?
(a) Each node has exactly zero or two children
(b) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left
(c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
(d) A tree in which all nodes have degree 2
(c) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
- What is the average case time complexity for finding the height of the binary tree?
(a) h = O(loglogn)
(b) h = O(nlogn)
(c) h = O(n)
(d) h = O(log n)
(d) h = O(log n)
- which of the following is not an advantage of trees?
(a) Hierarchical structure
(b) Faster search
(c) Router algorithms
(d) Undo/Redo operations in a notepad
(d) Undo/Redo operations in a notepad
- what is the maximum number of leaves in a binary tree of height h
(a) 2h−1
(b) h−1
(c) h
(d) 1
(a) 2h−1
- The number of edges from the node to the deepest leaf is called ________ of the tree.
(a) Height
(b) Depeath
(c) Length
(d) Width
(a) Height
- how many children does a binary tree have?
(a) two children
(b) three children
(c) No children
(d) Unlimited children
(a) two children
Related Topics