CS 3364 - Design Analysis of Algorithms Midterm Review

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Choose the incorrect statement about merge sort from the following A. It is a comparison based sort B. Merge sort has better space complexity than quick sort C. It is not an in place algorithm D. It is a stable algorithm

B. Merge sort has better space complexity than quick sort

In the Divide and Conquer Process, breaking the problems into smaller sub-problems is the responsibility of? A. Divide/Break B. Sorting/Divide C. Conquer/Solve D. Merge/Combine

A. Divide/Break

For a 55%-45% split in quicksort, what is the worst-case time complexity? A. nlogn B. n^2 C. n! D. 2^n

A. nlogn

What will be th number of iterations for the outer loop to sort the elements using insertion sort? [14, 12, 16, 6, 3, 10] A. 6 B. 5 C. 7 D. 1

B. 5

Which of the following best describes the useful criterion for comparing the efficiency of algorithms? A. Time B. Memory C. Both of the above D. None of the above

C. Both of the above

Strassen's matrix multiplication algorithm follows ___________ technique

Divide & Conquer

Master's Theorem is used for?

Solving recurrences

How is time complexity measured? A. By counting the number of algorithms in an algorithm B. By counting the number of primitive operations performed by the algorithm on a given input size C. By counting the size of data input to the algorithm D. None of the above

B. By counting the number of primitive operations performed by the algorithm on a given input size

Binary Search can be categorized into which of the following? A. Brute Force technique B. Divide and Conquer C. Greedy algorithm D. Dynamic programming

B. Divide and Conquer

Increase of loops in an algorithm can affect the Time Complexity A. True B. False

A. True

Karatsuba Algorithm uses Divide and Conquer techniques? A. True B. False

A. True

Master method is more convenient for recursion problem A. True B. False

A. True

A and B have a worst-case running time of O(n) and O(logn), respectively. Therefore, algorithm B always runs faster than algorithm A A. True B. False

B. False

What does it mean when we say that an algorithm X is asymptotically more efficient that Y? A. X will always be a better choice for small inputs B. X will always be a better choice for large inputs C. Y will always be a better choice for small inputs D. X will always be a better choice for all inputs

B. X will always be a better choice for large inputs

Which of the following is true about Quicksort A. The worst case running time is O(n^2) B. It uses divide and conquer C. It uses recursion D. All of the above

D. All of the above


Set pelajaran terkait

NU272 Case Study: Burns (week 3)

View Set

3. Physics Practice Questions Chapter 6

View Set

New York City Draft Riot note cards

View Set

Φυσική Α' Γυμνασίου

View Set