Skip to content
VUBuddy

CS301P Final Term Quiz 9 File 2 July 2023 by Miss Mehwish

Data Structures (Practical) PDF 539 KBUpdated 23 Oct 2026
Final term past paper CS301P Final Term Quiz 9 File 2 July 2023 by Miss Mehwish PDF 539 KB
vubuddy.com
Type
Final term past paper
Course
CS301P Data Structures (Practical)
Size
PDF 539 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 539 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 before submitting directly from the file. We are not responsible for 100% correction as human error exists

Q1. Which of the following methods takes one element at a time to make a heap? Options:

  1. percolatedown()
  2. percolatedown()
  3. Buildheap()
  4. traverse()

Correct option: c) Buildheap()

Q2. What would be the "mid" index if the value 10 is found using the binary search algorithm in the given array?

Array: 1 5 7 9 10 13 17 19 27 a) 3 b) 4 c) 5 d) 6

Correct option: a) 3

Q3. While implementing a min heap, the for loop in the insert() method is initialized with: Options:

  1. int hole = 2 * currentSize;
  2. int hole = currentSize;
  3. int hole = --currentSize;
  4. int hole = ++currentSize;

Correct option: d) int hole = ++currentSize;

Q4. Which of the following methods takes an array to make a heap out of it? Options:

  1. percolatedown()
  2. traverse()
  3. traverse()
  4. buildheap()

Correct option: d) buildheap()

Q5. In a min heap, deletemin() will put the ______ element at the first position of the array. Options:

  1. Last
  2. None of the given options
  3. Third
  4. First

Correct option: d) First

Q6. In the binary search algorithm, if the value being searched is smaller than "mid", then the updated "high" for the left half of the array will be computed as:

  1. High = mid + low
  2. High = mid + 1
  3. High = mid * 2
  4. High = mid - 1

Correct option: d) High = mid - 1

Q7. In the given array representation of a tree constructed with the Union by size method, which node is the parent of 7?

Array: -1 -1 -1 3 3 5 5 7 a) -1 b) 3 c) 5 d) 7

Correct option: c) 5

Q8. Which of the following nodes has the maximum value in a max heap? Options:

  1. None of the given options
  2. Rightmost child
  3. Leftmost child
  4. Root node

Correct option: d) Root node

All CS301P files →
CS301P Data Structures (Practical) All CS301P 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.