CS502 MID+Final by Attiq Kundi.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 320 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
PDF
Type
Final-Term
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
MIDTERM, FINALTERM

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

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. 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 MID+Final by Attiq Kundi.pdf for free?

You can preview and download "CS502 MID+Final by Attiq Kundi.pdf" (CS502 PDF, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs502-mid-final-by-attiq-kundi-pdf-2) 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 & Final
                           Quiz by Attiq Kundi
               SUBSCRIBE “Knowledge For Us” ON YOU TUBE
                        100 % CORRECT MCSQ
                            AND Many MoRe
                                 CS-502

1) The sieve technique works where we have to find ----------- tem(s) from a large input. Single page 34

2) The only way to convert an empty string into a string of j characters is by doing j insertions, represented as
E(0 , j)=j page 78

3) In Selection problem, the Sieve technique works in ------------ Phases page 34

4) Algorithm is a sequence of computational steps that --------- the input into output. Transform page 7

5) In max heap (for Heap Sort algorithm), when every time maximum element is removed from top we replace
it with ---------- in the leaf tree. Last page 41

6) If pj dominates pi and pi dominates ph then pj also dominates ph. It means dominance relation is Transitive
page 18

7) To find maximal points in brute-force algorithm, each point of space is compared against ----------of the
space. All other points page 13

8) In the following code the statement “cout<<j;” executes------------- times
For(j=1;j<=5;j=j+2)
Cout<<j; 3 times (conceptual)

9) For average-case time analysis of Quick sort algorithm, Pivot selection is on average basis from ------------ --.
All possible random values page 50

10) In the statement, “output P[i].x,P[i].y”, the number of times elements of P are accessed is -------------. 2
page 14

11) Identify the TRUE statement. The Knapsack problem belongs to the domain of optimization problems
Page 91

12) Matrix multiplication is a(n) ------------ operation. Associative page 85

13) provides us more accurate result when input values are not closer to each other. Median page
34(conceptual)

14) In merge sort algorithm, we split the array around the ------------ index q. Mid page 28

15) In the analysis of Selection algorithm, we get the convergent ------------ series. Geometric page 37

16) In Selection problem, the Sieve technique -----------. Eliminate undesired data items each time page 35

17) If matrix A of dimension p x q is multiplied with matrix B of dimension q x r, then each entry in resultant
matrix takes----------- time. O(q) page 84

18) In Sorting the key value or attribute ---------- form an ordered domain. Not always page 39

19) In Heap Sort algorithm, the total running time for Heapify procedure is -------------. Theta (log n) page 43

20) Pseudo code of algorithm are to be read by --------------. People page 12

21) In Dynamic Programming based solution of Knapsack Problem, if we decide to take an object „i‟, then we
gain ----------- --. Vi(value of object i)

22) The worst-case running time of Quick sort algorithm ------------ --. Is quadratic (google)

23) The only way to convert a string of i characters into the empty string is with i deletions, represented as
• E(i , 0)=i page 78

24) In Selection problem, the rank of an element will be its ------------ position if we sort the input data. Final
page 34

25) Which one is not passed as parameter in Quick sort algorithm? Array (containing input elements) (cs301)

26) While Sorting, the ordered domain means for any two input elements x and y ----------satisfies only. All of
the above page 39

27) Which of the following is calculated with Big O notation? Upper bounds page 25

28) For solving Selection problem, we introduced Sieve technique due to ---------- Eliminating Rank of an
element page 35

29) The worst-case running time of merge sort is ----------- in order to sort an array of n elements. O(n log n)
page 30

30) Quick sort is a recursive algorithm. True page 49

31) While analyzing Selection algorithm, we make a number of passes, in fact it could be as many as --------- --.
log(n) page 37

32) Approach for solving geometric problems by sweeping a line across the plane is called -------------- sweep.
Plane page 18

33) ----------- time is the maximum running time over all legal inputs. Worst-case page 13

34) The asymptotic growth of n(n+1)/2 is: O(�2) page 15

35) One of the limitations in 0/1 Knapsack is that an item can either be ------------ in the bag or not. Put page
91

36) --------- is one of the few problems, where provable lower bounds exist on how fast we can sort. Sorting
page 39
37) Selection algorithm takes theta ------------. (n) page 37

38) The Sieve technique is a special case, where the numbers of sub-problems is just -----. 1 page 34

39) Following is not the application of Edit Distance problem Ascending Sort page 76

40) We can use the optimal substructure property to devise a ----------- formulation of the edit distance problem.
Recursive page 78

41) In plane sweep approach, a vertical line is swept across the 2d-plane form ------------. Left to right page 18

42) In 3-Dimensional space, a point P has ------------ coordinate(s). (X,Y,Z) (google)

43) ------------ items are not allowed in the 0/1 Knapsack. Fractional page 91

44) Radix sort is not a non-comparative integer sorting algorithm. False (google)

45) Fibonacci sequence was named on ---------- , a famous mathematician in 12th Century. Leonardo Pisano
page 73

46) In generating Fibonacci Sequence, we can avoid unnecessary repetitions by ------------process.
Memorization page 74

47) The sequence of merge sort algorithm is: Divide-Conquer-Combine page 27

48) Sorting can be in -------------. Both Increasing and Decreasing order page 52

49) The process of ---------- ends when you are left with such tiny pieces remaining that it is trivial to solve them.
Divide and Conquer page 27

50) Time complexity of the “0-1” knapsack algorithm depends on ---------- --. Number of items and capacity
of knapsack (Google)

51) In max-heap, largest element is stored at root node. Where is the smallest element stored? Leaf Node
(Google)

52) For ---------- values of n, any------------algorithm is fast enough. Small pg#14

53) To predict the cost of an algorithm in terms of resources is called -------- --. Analysis (Google)

More CS502 files

All CS502 files · Midterm Prep 2026 · MCQs Bank