Skip to content
VUBuddy

CS301 Final Term Quiz 4 July 2023 by Miss Mehwish

Data Structures PDF 538 KBUpdated 23 Oct 2026
Final term past paper CS301 Final Term Quiz 4 July 2023 by Miss Mehwish PDF 538 KB
vubuddy.com
Type
Final term past paper
Course
CS301 Data Structures
Size
PDF 538 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 538 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 4. Download the file for all 4 pages.

We also provide Past papers for Mids. and Finals Cross Check your answers befo re submitting directly from the file. We are not responsible for 100% correction as human error exists

Q1. If whole data is given to construct the min heap, then which of the following is true? Options:

  1. Both Insert and BuildHeap methods are equally appropriate
  2. Insert method is appropriate for construction
  3. Both Insert and BuildHeap methods are inappropriate
  4. BuildHeap method is appropriate for construction

Correct option: d) BuildHeap method is appropriate for construction

Q2. In a perfect binary tree of height h, the total number of nodes N is ___________. Options:

  1. 2h - 1
  2. 2h + 1
  3. 2h - 1 + 1
  4. 2h - 1 - 1

Correct option: a) 2h - 1

Q3. Median is ___________.

  1. K = N * 3
  2. K = N * 2
  3. K = N / 3
  4. K = N / 2

Correct option: d) K = N / 2

Q4. The scenario "If Ali is brother of Asif and Asif is brother of Uzma then Ali is brother of Uzma" is the example of ___________ property.

  1. Identity
  2. Transitive
  3. Symmetry
  4. Reflexive

Correct option: b) Transitive

  1. Given the values are the array representation of a heap: 12, 23, 26, 31, 34, 44, 56, 64, 78,

Q100. What is the 5th smallest element in the given heap?

  1. 31
  2. 56
  3. 34
  4. 44

Correct option: c) 34

Q6. In a min heap, if there are 100 elements in a heap and we perform 100 deleteMin operations, then we will get the elements in _________.

  1. Unsorted
  2. Ascending order
  3. Descending order
  4. Random

Correct option: b) Ascending order

Q7. The main reason for using a heap in a priority queue is ___________. Options:

  1. Improve performance
  2. Heap can't be used in priority queues
  3. Less code
  4. Code is readable

Correct option: a) Improve performance

Q8. In the heap's percolateDown method, why do we start our iterations from n/2 instead of n? Options:

  1. Because nth node is a leaf node and it doesn't have any left and right child to get sorted
  2. nth node key is always the largest
  3. nth node contains null
  4. Because n node iterations create complexity
All CS301 files →
CS301 Data Structures All CS301 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.