CS301P Final Term Quiz 9 File 2 July 2023 by Miss Mehwish
- Type
- Final term past paper
- Course
- CS301P Data Structures (Practical)
- Size
- PDF 539 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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:
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:
Correct option: d) int hole = ++currentSize;
Q4. Which of the following methods takes an array to make a heap out of it? Options:
Correct option: d) buildheap()
Q5. In a min heap, deletemin() will put the ______ element at the first position of the array. Options:
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:
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:
Correct option: d) Root node
Related CS301P files
All CS301P files →- CS301P Final Term Graded 3 Quiz 8 July 2023 by Miss Mehwish Final term PDF 538 KB
- CS301P Final Term Quizzes July 2023 by Sana Sheikh Final term PDF 598 KB
- CS301P Final Term Quiz 8 July 2023 by Miss Mehwish Final term PDF 531 KB
- CS301P Final Term Quiz 9 July 2023 by Miss Mehwish Final term PDF 745 KB
- CS301P Final Term MCQs by Miss Mehwish Final term PDF 1.9 MB
- CS301P Quiz 3 Quiz PDF 855 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.