Skip to main content

Binary Search Trees_B Tree — Part 2 MCQs with Explanations

Practice high-yield Computer Science & IT MCQs on Binary Search Trees_B Tree — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ PPSC ★ FPSC

In a Binary Search Tree (BST), how can you find the depth of a particular node?

Question 2 of 40
★ PPSC ★ FPSC

What is the typical use case for a Binary Search Tree (BST) in computing?

Question 3 of 40
★ PPSC ★ FPSC

What is the result of an inorder traversal of a Binary Search Tree (BST)?

Question 4 of 40
★ PPSC ★ FPSC

How do you handle duplicate values in a Binary Search Tree (BST) if duplicates are allowed?

Question 5 of 40
★ PPSC ★ FPSC

In a Binary Search Tree (BST), what does the term "node height" refer to?

Question 6 of 40
★ PPSC ★ FPSC

What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)

Question 7 of 40
★ PPSC ★ FPSC

Consider a situation of writing a binary tree into a file with memory storage efficiency in mind, is array representation of tree is good?

Question 8 of 40
★ PPSC ★ FPSC

Which of the following is an application of Red-black trees and why?

Question 9 of 40
★ PPSC ★ FPSC

What is the worst case analysis of an AA-Tree?

Question 10 of 40
★ PPSC ★ FPSC

Select the code snippet which performs in-order traversal.

Question 11 of 40
★ PPSC ★ FPSC

What is the priority of a null node?

Question 12 of 40
★ PPSC ★ FPSC

Why to prefer red-black trees over AVL trees?

Question 13 of 40
★ PPSC ★ FPSC

A self - balancing binary search tree can be used to implement . . . . . . . .

Question 14 of 40
★ PPSC ★ FPSC

What output does the below pseudo code produces? Tree_node function(Tree_node x) { Tree_node y = x.left; x.left = y.right; y.right = x; return y; }

Question 15 of 40
★ PPSC ★ FPSC

What is a Cartesian tree?

Question 16 of 40
★ PPSC ★ FPSC

To obtain a prefix expression, which of the tree traversals is used?

Question 17 of 40
★ PPSC ★ FPSC

What is the special property of red-black trees and what root should always be?

Question 18 of 40
★ PPSC ★ FPSC

Find the postorder traversal of the binary tree shown below.

Question 19 of 40
★ PPSC ★ FPSC

In a full binary tree if number of internal nodes is I, then number of leaves L are?

Question 20 of 40
★ PPSC ★ FPSC

Several other operations like union set difference and intersection can be done in treaps.

Question 21 of 40
★ PPSC ★ FPSC

Consider a sequence of numbers to have repetitions, how a cartesian tree can be constructed in such situations without violating any rules?

Question 22 of 40
★ PPSC ★ FPSC

The balance factor of a node in a binary tree is defined as . . . . . . . .

Question 23 of 40
★ PPSC ★ FPSC

What is the code below trying to print? void print(tree *root,tree *node) { if(root ==null) return 0 if(root-->left==node || root-->right==node) || print(root->left,node) ||printf(root->right,node) { print(root->data) } }

Question 24 of 40
★ PPSC ★ FPSC

Which operation is used to combine two auxiliary trees?

Question 25 of 40
★ PPSC ★ FPSC

Using what formula can a parent node be located in an array?

Question 26 of 40
★ PPSC ★ FPSC

Which of the following is also known as Rope data structure?

Question 27 of 40
★ PPSC ★ FPSC

Why to prefer splay trees?

Question 28 of 40
★ PPSC ★ FPSC

Is Treap a randomized tree.

Question 29 of 40
★ PPSC ★ FPSC

What are double and single threaded trees?

Question 30 of 40
★ PPSC ★ FPSC

Which of the dynamic operations are used in Top Tree data structure implementation?

Question 31 of 40
★ PPSC ★ FPSC

The binary tree sort implemented using a self - balancing binary search tree takes . . . . . . . . time is worst case.

Question 32 of 40
★ PPSC ★ FPSC

A treap is a cartesian tree with . . . . . . . .

Question 33 of 40
★ PPSC ★ FPSC

How many different shapes does maintenance of AA-Tree need to consider?

Question 34 of 40
★ PPSC ★ FPSC

What must be the missing logic in place of missing lines for finding sum of nodes of binary tree in alternate levels? //e.g:-consider -complete binary tree:-height-3, [1,2,3,4,5,6,7]-answer must be 23 n=power(2,height)-1; //assume input is height and a[i] contains tree elements for(i=1;i<=n;) { //present level is initialized to 1 and sum is initialized to 0 for(j=1;j<=pow(2,currentlevel-1);j++) { sum=sum+a[i]; i=i+1; } //missing logic }

Question 35 of 40
★ PPSC ★ FPSC

A full binary tree can be generated using . . . . . . . .

Question 36 of 40
★ PPSC ★ FPSC

For a binary tree the first node visited in in-order and post-order traversal is same.

Question 37 of 40
★ PPSC ★ FPSC

Advantages of linked list representation of binary trees over arrays?

Question 38 of 40
★ PPSC ★ FPSC

Is the below tree representation of 50, 100,400,300,280 correct way to represent cartesian tree?

Question 39 of 40
★ PPSC ★ FPSC

What is the space complexity of the post-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)

Question 40 of 40
★ PPSC ★ FPSC

What is wrong with below code for inorder traversal of inorder threaded binary tree: inordertraversal(threadedtreenode root): threadedtreenode q = inorderpredecessor(root) while(q!=root): q=inorderpredecessor(q) print q.data

✓ Link copied to clipboard
Continue Your Practice

Advanced Mapreduce Concepts — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Computer Science & IT

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Computer Science & IT

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →