Student’s Name…………………………………… Roll No.
VIVEKANANDA COLLEGE OF TECHNOLOGY AND MANAGEMENT, ALIGARH
QUIZ NO. I(SET A)
Course with Branch: B.Tech (CSE/IT) Session: 2024-25 Year/Semester: 3rd Year
Subject with Code: Time: 20 min. Max. Marks: 10
Q.1. Which of the following best describes a divide-and-conquer algorithm?
A) An algorithm that solves a problem by breaking it down into smaller subproblems, solving each subproblem
independently, and combining their results.
B) An algorithm that solves a problem by iterating through all possible solutions.
C) An algorithm that uses dynamic programming to optimize recursive calls.
D) An algorithm that sorts data in place without additional memory.
Q.2. What is the time complexity of the best-case scenario for Quick Sort?
A) O(n log n) B) O(n^2) C) O(n) D) O(log n)
Q.3. Which method is commonly used to solve recurrence relations?
A . Iterative method B . Dynamic programming C . Master theorem D . All of the above
Q.4. In the context of algorithm complexity, what does "Big Theta" (Θ) notation represent?
A) The upper bound of an algorithm's growth rate. B) The lower bound of an algorithm's growth rate.
C) The exact asymptotic behavior of an algorithm's growth rate. D) The average case performance of an algorithm.
Q.5. What is the primary disadvantage of using Shell Sort compared to other sorting algorithms?
A) It requires more memory than Merge Sort. B) Its performance heavily depends on the choice of gap sequence.
C) It is not stable and can disrupt the order of equal elements. D) It has a worst-case time complexity worse than O(n^2).
Q.6. Which notation describes an Lower bound on the time complexity of an algorithm?
A . O(n) B . Ω(n) C . Θ(n) D . All of the above
Q.7. Using the recursion tree method, what is the height of the tree for the recurrence relation T(n)=3T(n/3)+nlog33?
A) O(logn) B) O(√n) C) O(n1/3) D) O(nlog33)
Q.8. Which of the following correctly describes Big O notation?
A) It represents the lower bound of an algo's complexity B) It describes the upper limit of an algo's running time.
C) It provides an average-case scenario for performance. D) It is used exclusively for space complexity analysis.
Q.9.Using the substitution method, solve the recurrence T(n)=2T(n/2)+n2. What is the final time complexity?
A) O(n2) B) O(nlogn) C) O(n3) D) O(n2 logn)
Q.10. Consider the recurrence relation: T(n)=2T(n/2)+n. What is its time complexity using the Master Theorem?
A) O(nlogn) B) O(n2) C) O(logn) D) O(1)
Marks Obtained…………………….. Signature of Teacher………………………………..
Student’s Name…………………………………… Roll No.
VIVEKANANDA COLLEGE OF TECHNOLOGY AND MANAGEMENT, ALIGARH
QUIZ NO. I(SET B)
Course with Branch: B.Tech (CSE/IT) Session: 2024-25 Year/Semester: 3rd Year
Subject with Code: Time: 20 min. Max. Marks: 10
Q.1. What is the time complexity of the best-case scenario for Quick Sort?
A) O(n log n) B) O(n^2) C) O(n) D) O(log n)
Q.2. Which of the following best describes a divide-and-conquer algorithm?
A) An algorithm that solves a problem by breaking it down into smaller subproblems, solving each subproblem
independently, and combining their results.
B) An algorithm that solves a problem by iterating through all possible solutions.
C) An algorithm that uses dynamic programming to optimize recursive calls.
D) An algorithm that sorts data in place without additional memory.
Q.3. Which method is commonly used to solve recurrence relations?
A . Iterative method B . Dynamic programming C . Master theorem D . All of the above
Q.4. In the context of algorithm complexity, what does "Big Theta" (Θ) notation represent?
A) The upper bound of an algorithm's growth rate. B) The lower bound of an algorithm's growth rate.
C) The exact asymptotic behavior of an algorithm's growth rate. D) The average case performance of an algorithm.
Q.5. What is the primary disadvantage of using Shell Sort compared to other sorting algorithms?
A) It requires more memory than Merge Sort. B) Its performance heavily depends on the choice of gap sequence.
C) It is not stable and can disrupt the order of equal elements. D) It has a worst-case time complexity worse than O(n^2).
Q.6. What is the asymptotic notation for constant time complexity?
A . O(1) B . O(n) C . O(log n) D . O(n^2)
Q.7. Using the recursion tree method, what is the height of the tree for the recurrence relation T(n)=3T(n/3)+nlog33?
A) O(logn) B) O(√n) C) O(n1/3) D) O(nlog33)
Q.8. Which of the following is true about the relationship between O(n) and Ω(n)?
A . O(n) is always greater than Ω(n) B . Ω(n) is always greater than O(n)
C . O(n) and Ω(n) are equal D . There`s no relationship between O(n) and Ω(n)
Q.9.Using the substitution method, solve the recurrence T(n)=2T(n/2)+n2. What is the final time complexity?
A) O(n2) B) O(nlogn) C) O(n3) D) O(n2 logn)
Q.10. Consider the recurrence relation: T(n) = 4T(n/2) + n^2. What is its time complexity using the Master
Theorem?
A . O(n) B . O(n log n) C . O(n^2) D . O(n^2 log n)
Marks Obtained…………………….. Signature of Teacher………………………………..
SET A
Q1 A
Q2 C
Q3 C
Q4 C
Q5 B
Q6 B
Q7 A
Q8 B
Q9 A
Q10 A
SET B
Q1 C
Q2 A
Q3 C
Q4 C
Q5 B
Q6 A
Q7 A
Q8 C
Q9 A
Q10 C