Explore topic-wise MCQs in Data Structures and Algorithms.

This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.

1.

What is inefficient with the below threaded binary tree picture?

A. it has dangling pointers
B. nothing inefficient
C. incorrect threaded tree
D. space is being used more
Answer» B. nothing inefficient
2.

What is wrong with below code for inorder traversal of inorder threaded binary tree:

A. inordersuccessor instead of inorderpredecessor must be done
B. code is correct
C. it is code for post order
D. it is code for pre orderView Answer
Answer» B. code is correct
3.

Which of the following tree traversals work if the null left pointer pointing to the predecessor and null right pointer pointing to the successor in a binary tree?

A. inorder, postorder, preorder traversals
B. inorder
C. postorder
D. preorder
Answer» B. inorder
4.

In general, the node content in a threaded binary tree is ________

A. leftchild_pointer, left_tag, data, right_tag, rightchild_pointer
B. leftchild_pointer, left_tag
C. leftchild_pointer, left_tag, right_tag, rightchild_pointer
D. leftchild_pointer, left_tag, data
Answer» B. leftchild_pointer, left_tag
5.

inordersuccessor instead of inorderpredecessor must be don?

A. code is correct
B. it is code for post order
C. it is code for pre order
Answer» B. it is code for post order
6.

What are double and single threaded trees?

A. when both left, right nodes are having null pointers and only right node is null pointer respectively
B. having 2 and 1 node
C. using single and double linked lists
D. using heaps and priority queues
Answer» B. having 2 and 1 node
7.

The null left pointer pointing to predecessor and null right pointer pointing to successor. how many types of threaded tree are possible with this convention?

A. inorder, postorder, preorder traversals
B. inorder
C. postorder
D. preorder
Answer» B. inorder
8.

What are null nodes filled with in a threaded binary tree?

A. inorder predecessor for left node and inorder successor for right node information
B. right node with inorder predecessor and left node with inorder successor information
C. they remain null
D. some other values randomly
Answer» B. right node with inorder predecessor and left node with inorder successor information
9.

What may be the content of a node in threaded binary tree?

A. leftchild_pointer, left_tag, data, right_tag, rightchild_pointer
B. leftchild_pointer, left_tag
C. leftchild_pointer, left_tag, right_tag, rightchild_pointer
D. leftchild_pointer, left_tag, data
Answer» B. leftchild_pointer, left_tag
10.

What are the disadvantages of normal binary tree traversals?

A. there are many pointers which are null and thus useless
B. there is no traversal which is efficient
C. complexity in implementing
D. improper traversals
Answer» B. there is no traversal which is efficient
11.

What is a threaded binary tree traversal?

A. a binary tree traversal using stacks
B. a binary tree traversal using queues
C. a binary tree traversal using stacks and queues
D. a binary tree traversal without using stacks and queues
Answer» E.