CS502 MidTerm MCQs by Talha Sajid.pdf
Verified academic study resource for CS502 (Fundamentals of Algorithms) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.
- Course
- CS502 – Fundamentals of Algorithms
- Faculty
- Computer Science
- Format
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Tags
- MCQ, MIDTERM
Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS502.
What this file covers — CS502 syllabus roadmap
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
Frequently asked questions
Where can I download CS502 MidTerm MCQs by Talha Sajid.pdf for free?
You can preview and download "CS502 MidTerm MCQs by Talha Sajid.pdf" (CS502 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs502-midterm-mcqs-by-talha-sajid-pdf) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS502 file?
This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.
What is the passing criteria for CS502 under the VU 20% Two-Half Rule?
Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.
Are CS502 solved past papers and handouts verified for 2026 exams?
Yes. All CS502 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.
Inside this file
Mid-Term CS502(Fundamentals of Algorithms) Page 1 of 45
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 2 of 45
1.. Heap sort is a/an _______ and ________ sorting algorithm.
A. Not in-place, not stable one
B. In-place, not stable one
C. Not in-place, stable one
D. In-place, stable one
2. The sequence of merge sort algorithm is:
a) Divide Combine-Conquer
b) Conquer-Divide-Combine
c) Divide-Conquer-Combine
d) Combine-Divide-Conquer
3. In ______ Knapsack Problem, limitation is that an item can either be put in the bag or
not. Fractional items are not allowed.
a) 0
b) 1
c) 0/1
d) Fractional
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
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 3 of 45
d) We are left with a hole
5. In Bucket sort, if there are duplicates then each bin can be replaced by a __________.
a) Hash table
b) Heap
c) Stack
d) 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
7. The average case running time of quick sort algorithm is theta _________.
a) n x n log(n)
b) Log(n)
c) nlog(n)
d) (n)
8. Quick sort algorithm required a lot of comparisons in the ____________ condition.
a) Worst case
b) Best and Average case
c) Average case
d) Best case
9. Memorization is a part of ________ programming strategy.
a) dynamic
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 4 of 45
b) fast
c) memory
d) slow
10. ____________ programming is essentially recursion without repetition.
a) array
b) Dynamic
c) N log n
d) Fast
11. The main shortcoming of counting sort is that it is useful for__________.
a) large integers
b) large real numbers
c) small real numbers
d) small integers
12. In max heap (for Heap Sort algorithm), when every time maximum element is removed
from top we replace it with _____ leaf in the tree.
a) second last
b) Last
c) First
d) Any
13. Quick sort algorithm was developed by -
a) AlferdAho
b) Sedgewick
c) John Vincent Atanasoff
d) Tony Hoare
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 5 of 45
14. If Matrix-A has dimensions "3x2" and Matrix-B has dimensions "2x3", then
multiplication of Matrix-A and Matrix-B will result a new Matrix-C having dimensions.
a) 3x2
b) 2x3
c) 2x2
d) 3x3
15. In Sorting the key value or attribute_____ from an ordered domain.
a) Must be
b) Not always
c) May be
d) Occasionally
16. Floor and ceiling are ______ to calculate while analyzing
algorithms
a) Very easy
b) Usually considered difficult
c) 3rd Option is missing
d) 4th Option is missing
17. _____ of reference is an important fact of current processor technology.
a) Defining
b) Assigning
c) Formality
d) Locality
18. In average-case time analysis of Quick sort algorithm, the most balanced case for
partition is when we divide the list of elements into _.
a) Equal no. of pieces as of input elements
b) Single piece exactly
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 6 of 45
c) Two nearly equal pieces
d) Three nearly equal pieces
19. Which of the following is calculated with Big O notation?
a) Medium bounds
b) Upper bounds
c) Lower bounds
d) Both upper and lower bounds
20. Edit distance algorithm based on ________ strategy
a) Greedy
b) Dynamic Programming
c) Divide and Conquer
d) Searching
21. In Heapsort Algorithm, total time taken by heapify procedure is ________
a) (log n)
b) (log2 n)
c) (n log n)
d) (n2 log n)
22. Al-Khwarizmi was a/an _______
a) Artist
b) Mathematician
c) Astronomer
d) Khalifah
23. Pseudo code of algorithms are to be read by _______.
a) People
Contact us on WhatsApp 0328-4090195
Mid-Term CS502(Fundamentals of Algorithms) Page 7 of 45
b) RAM
c) Computer
d) Compiler
24. When a recursive algorithm revisits the same problem over and over
again, we say that the optimization problem has ________ sub-problems.
a) Overlapping
b) Over costing
c) Optimized
d) Three
25. In order to say anything meaningful about our algorithms, it will be important for us to
settle on a ______.
a) Java Program
b) C++ Program
c) Pseudo program
d) Mathematical model of computation
26. Comparison-based sorting algorithms always takes ____________ time.
a) Theta nlog(n)
b) Omega n(n^2)
c) Big Oh nlog(n)
d) Omega nlog(n)
27. Quick sort does not require any additional array for storage except for
recursive function calls is called __________.
a) In-Place
b) Stable
c) Not In-Place
d) Unsorted
More CS502 files
- CS502 MIDTERM FILE 1 SOLVED BY TEAM HADI-1.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 10 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 2 SOLVED BY TEAM HADI-1.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 2 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS502 MIDTERM FILE 2 SOLVED BY TEAM HADI.pdf (PDF · Midterm)