Skip to main content

Heaps — Part 2 MCQs with Explanations

Practice high-yield Computer Science & IT MCQs on Heaps — 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

What operation is performed to convert a binary heap into a sorted array?

Question 2 of 40
★ PPSC ★ FPSC

In which situation would you prefer using a Fibonacci heap over a binary heap?

Question 3 of 40
★ PPSC ★ FPSC

Which algorithm uses a binary heap to improve its performance?

Question 4 of 40
★ PPSC ★ FPSC

What is the maximum number of children a node can have in a binary heap?

Question 5 of 40
★ PPSC ★ FPSC

How do you ensure that a binary heap remains a valid heap after multiple insertions?

Question 6 of 40
★ PPSC ★ FPSC

Multiplication and division to find children and parents cannot be implemented in a d-heap.

Question 7 of 40
★ PPSC ★ FPSC

A leftist heap is also said to be a binary heap.

Question 8 of 40
★ PPSC ★ FPSC

Who invented d-ary heap?

Question 9 of 40
★ PPSC ★ FPSC

What is the child of smallest element of the given minimum ternary heap?

Question 10 of 40
★ PPSC ★ FPSC

Heap can be used as . . . . . . . .

Question 11 of 40
★ PPSC ★ FPSC

The procedure given below is used to maintain min-order in the min heap. Find out the missing statements, represented as X. procedure TrickleDownMin(i) if A[i] has children then m := index of smallest of the children or grandchildren (if any) of A[i] if A[m] is a grandchild of A[i] then if A[m] < A[i] then swap A[i] and A[m] X: _______________________ ____________________ endif TrickleDownMin(m) endif else //{A[m] is a child of A[i]} if A[m] << A[i] then swap A[i] and A[m] endif endif

Question 12 of 40
★ PPSC ★ FPSC

Why is this heap named leftist heap?

Question 13 of 40
★ PPSC ★ FPSC

What is the space complexity of searching in a heap?

Question 14 of 40
★ PPSC ★ FPSC

Which of the following operations does not destroy the leftist heap property?

Question 15 of 40
★ PPSC ★ FPSC

The main distinguishable characterstic of a binomial heap from a binary heap is that

Question 16 of 40
★ PPSC ★ FPSC

How many basic operations can be performed in a d-heap?

Question 17 of 40
★ PPSC ★ FPSC

What is the time complexity for deleting root key in a ternary heap of n elements?

Question 18 of 40
★ PPSC ★ FPSC

What is the reason for the efficiency of a pairing heap?

Question 19 of 40
★ PPSC ★ FPSC

If there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?

Question 20 of 40
★ PPSC ★ FPSC

What is order of resultant heap after merging two tree of order k?

Question 21 of 40
★ PPSC ★ FPSC

Min heap can be used to implement selection sort.

Question 22 of 40
★ PPSC ★ FPSC

What would be the result if the left subtree of the root has a null path length of 1 and the right subtree has a null path length of 2?

Question 23 of 40
★ PPSC ★ FPSC

What will be the order of new heap created after union of heap H1 and H2 when created by the following code.Initially both are of the order n. FIB_UNION(H1,H2) { H =MAKE_HEAP() min[H]= min[H1] concatenate the root list of H2 with the root list of H if (min[H1] = NIL) or (min[H2]!= NIL and min[H2] < min[H1]) then min[H] = min[H2] n[H]= n[H1] + n[H2] free the objects H1 and H2 return H }

Question 24 of 40
★ PPSC ★ FPSC

What is the complexity of adding an element to the heap.

Question 25 of 40
★ PPSC ★ FPSC

Is decrease priority operation performed more quickly in a ternary heap with respect to the binary heap.

Question 26 of 40
★ PPSC ★ FPSC

Do ternary heap have better memory cache behavior than binary heap.

Question 27 of 40
★ PPSC ★ FPSC

d-heap is similar to that of a?

Question 28 of 40
★ PPSC ★ FPSC

What is the fundamental operation on leftist heap?

Question 29 of 40
★ PPSC ★ FPSC

What is the smallest element of the given minimum ternary heap?

Question 30 of 40
★ PPSC ★ FPSC

State the complexity of algorithm given below. int function(vector<int> arr) int len=arr.length(); if(len==0) return; temp=arr[len-1]; arr.pop_back(); return temp;

Question 31 of 40
★ PPSC ★ FPSC

What is the process of building a ternary heap called?

Question 32 of 40
★ PPSC ★ FPSC

Which operation is not efficiently performed in a d-heap?

Question 33 of 40
★ PPSC ★ FPSC

In a binary min heap containing n elements, the largest element can be found in . . . . . . . . time.

Question 34 of 40
★ PPSC ★ FPSC

What is the worst case time in searching minimum value in weak -heap?

Question 35 of 40
★ PPSC ★ FPSC

Pairing heaps time complexity was inspired by that of?

Question 36 of 40
★ PPSC ★ FPSC

What is the time complexity for inserting a new item in a ternary heap of n elements?

Question 37 of 40
★ PPSC ★ FPSC

What will be the position of 5, when a max heap is constructed on the input elements 5, 70, 45, 7, 12, 15, 13, 65, 30, 25?

Question 38 of 40
★ PPSC ★ FPSC

What are the siblings of smallest element of the given maximum ternary heap?

Question 39 of 40
★ PPSC ★ FPSC

What is the time complexity for decreasing priority of key in a minimum ternary heap of n elements?

Question 40 of 40
★ PPSC ★ FPSC

Choose the correct properties of weak-heap.

✓ 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 →