- Type
- Midterm past paper
- Course
- CS502 Fundamentals of Algorithms
- Size
- PDF 1.4 MB
- 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 2, 3, 4 of 45. Download the file for all 45 pages.
Q1. . Heap sort is a/an _______ and ________ sorting algorithm.
Correct answer: In-place, not stable one
Q2. The sequence of merge sort algorithm is:
Correct answer: Divide-Conquer-Combine
Q3. In ______ Knapsack Problem, limitation is that an item can either be put in the bag or not. Fractional items are not allowed.
Correct answer: 0/1
4. In Heap Sort algorithm (using max heap), when every time
maximum elements removed from top ________. a) We call merge Sort Algorithm b) it becomes Order n2 Algorithm c) Divide and Conquer strategy helps us
d) We are left with a hole
Q5. In Bucket sort, if there are duplicates then each bin can be replaced by a __________.
Correct answer: Linked list
6. If there are duplicates in __________ sort, then each bin can be
replaced by a linked list. a) Heap b) Merge
c) Bucket
d) Quick
Q7. The average case running time of quick sort algorithm is theta _________.
Correct answer: nlog(n)
Q8. Quick sort algorithm required a lot of comparisons in the ____________ condition.
Correct answer: Worst case
Q9. Memorization is a part of ________ programming strategy.
Correct answer: dynamic
Q10. ____________ programming is essentially recursion without repetition.
Correct answer: array
Q11. The main shortcoming of counting sort is that it is useful for__________.
Correct answer: small integers
Q12. In max heap (for Heap Sort algorithm), when every time maximum element is removed from top we replace it with _____ leaf in the tree.
Correct answer: Last
Q13. Quick sort algorithm was developed by -
Correct answer: Tony Hoare
Related CS502 files
All CS502 files →- CS502 Midterm Preparation Midterm PDF 548 KB
- CS502 Midterm MCQs by Waqar Siddhu Midterm PDF 10.5 MB
- CS502 Midterm MCQs Set 2 by VU Topper RM Midterm PDF 901 KB
- CS502 Midterm Subjective by Waqar Siddhu Midterm PDF 4 MB
- CS502 Highlighted Handouts Set 3 Highlighted PDF 1.7 MB
- CS502 Solved Quiz 3 by Introvert Quiz PDF 527 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.