Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 2 MCQs Divide and Conquer

ECAP538 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 General method Easy

    What is the first main step in the divide-and-conquer method?

  2. Question 2 of 60 General method Easy

    Which three steps typically form a divide-and-conquer algorithm?

  3. Question 3 of 60 General method Easy

    What is a base case in a recursive divide-and-conquer algorithm?

  4. Question 4 of 60 General method Easy

    In divide and conquer, what does the combine step do?

  5. Question 5 of 60 Binary search Easy

    What condition must normally be satisfied before binary search is applied to an array?

  6. Question 6 of 60 Binary search Easy

    Which element does binary search examine first?

  7. Question 7 of 60 Binary search Easy

    What is the worst-case time complexity of binary search on a sorted array of elements?

  8. Question 8 of 60 Binary search Easy

    If the target is smaller than the middle element in an ascending sorted array, where does binary search continue?

  9. Question 9 of 60 Merge sort Easy

    How does merge sort divide an array?

  10. Question 10 of 60 Merge sort Easy

    What happens during the merge step of merge sort?

  11. Question 11 of 60 Merge sort Easy

    What is the worst-case time complexity of merge sort?

  12. Question 12 of 60 Merge sort Easy

    When does the recursive division in merge sort normally stop?

  13. Question 13 of 60 Quick sort Easy

    Which special element is selected during quick sort?

  14. Question 14 of 60 Quick sort Easy

    What is the purpose of partitioning in quick sort?

  15. Question 15 of 60 Quick sort Easy

    What is the average-case time complexity of quick sort?

  16. Question 16 of 60 Quick sort Easy

    What is the worst-case time complexity of quick sort?

  17. Question 17 of 60 Arithmetic with large integers Easy

    Why may standard fixed-size data types be unsuitable for very large integers?

  18. Question 18 of 60 Arithmetic with large integers Easy

    In divide-and-conquer multiplication, how are large integers commonly divided?

  19. Question 19 of 60 Arithmetic with large integers Easy

    Which algorithm is known for multiplying large integers using divide and conquer?

  20. Question 20 of 60 Arithmetic with large integers Easy

    How many recursive multiplications does the basic Karatsuba method use for each split?

  21. Question 21 of 60 General method Medium

    A divide-and-conquer algorithm divides a problem of size into two subproblems of size and uses time to combine their solutions. What is its time complexity?

  22. Question 22 of 60 General method Medium

    What is the asymptotic solution of the recurrence ?

  23. Question 23 of 60 General method Medium

    Which problem characteristic most directly supports an efficient divide-and-conquer solution?

  24. Question 24 of 60 General method Medium

    An algorithm solves one subproblem of size and performs additional work. What is the solution of ?

  25. Question 25 of 60 Binary search Medium

    In the worst case, how many element comparisons are needed for a successful binary search in a sorted array of distinct elements?

  26. Question 26 of 60 Binary search Medium

    Which recurrence best represents the running time of binary search?

  27. Question 27 of 60 Binary search Medium

    To find the first occurrence of a target in a sorted array containing duplicates, what should binary search do when it finds the target at index ?

  28. Question 28 of 60 Binary search Medium

    A Boolean predicate is false up to some index and true afterward. Using a half-open interval , which update correctly finds the first true index?

  29. Question 29 of 60 Merge sort Medium

    Which recurrence describes standard merge sort on an array of size ?

  30. Question 30 of 60 Merge sort Medium

    During merging, which rule preserves the stability of merge sort when the front elements of the two halves have equal keys?

  31. Question 31 of 60 Merge sort Medium

    While counting inversions during a merge, the next element from the right half is smaller than the next element from the left half. How many inversions should be added?

  32. Question 32 of 60 Merge sort Medium

    A bottom-up merge sort begins with eight sorted runs of length . How many complete merge passes are required to obtain one sorted run?

  33. Question 33 of 60 Quick sort Medium

    Lomuto partitioning is applied to using the last element as pivot and the comparison . What array results after partitioning?

  34. Question 34 of 60 Quick sort Medium

    A naive quick sort uses Lomuto partitioning with the last element as pivot and treats values equal to the pivot as smaller. What is its running time on an array whose elements are all equal?

  35. Question 35 of 60 Quick sort Medium

    Suppose every quick-sort pivot divides the input into subarrays of sizes approximately and . What is the overall running time?

  36. Question 36 of 60 Quick sort Medium

    If quick sort selects its pivot uniformly at random from distinct elements, what is the probability that the pivot is either the smallest or the largest element?

  37. Question 37 of 60 Arithmetic with large integers Medium

    Let and , where is a power of the number base. Which expression correctly represents ?

  38. Question 38 of 60 Arithmetic with large integers Medium

    How does Karatsuba multiplication reduce the number of recursive half-size multiplications compared with the basic divide-and-conquer method?

  39. Question 39 of 60 Arithmetic with large integers Medium

    What is the asymptotic running time of Karatsuba multiplication according to ?

  40. Question 40 of 60 Arithmetic with large integers Medium

    Ignoring lower-order addition costs, what happens to the recursive multiplication work when the operand length is doubled in schoolbook divide-and-conquer multiplication and in Karatsuba multiplication?

  41. Question 41 of 60 General method Hard

    Consider the recurrence with constant work at the base case. What is its asymptotic solution?

  42. Question 42 of 60 General method Hard

    For powers of two, suppose and . Which bound is tight?

  43. Question 43 of 60 General method Hard

    A divide-and-conquer algorithm satisfies , ignoring rounding. Which asymptotic running time follows?

  44. Question 44 of 60 General method Hard

    A parallel divide-and-conquer algorithm creates subproblems of size , performs combine work, and has . Subproblems execute concurrently, but the combine operation is sequential. What is the asymptotic parallelism ?

  45. Question 45 of 60 Binary search Hard

    A lower-bound search uses the half-open interval and updates when , otherwise setting . Which invariant is sufficient to establish correctness?

  46. Question 46 of 60 Binary search Hard

    A sorted array is rotated at an unknown pivot and may contain arbitrarily many duplicate values. What is the tight worst-case complexity of determining whether a target occurs using comparison-based search?

  47. Question 47 of 60 Binary search Hard

    Exponential search examines indices until it brackets a present target whose first occurrence is at index , and then performs binary search. What is the tight comparison bound?

  48. Question 48 of 60 Binary search Hard

    A lower-bound algorithm must distinguish all possible insertion positions using binary predicates of the form . What is the minimum possible worst-case number of predicate evaluations?

  49. Question 49 of 60 Merge sort Hard

    For , what is the exact maximum number of element-to-element comparisons performed by standard top-down merge sort?

  50. Question 50 of 60 Merge sort Hard

    While merging sorted halves and to count strict inversions satisfying and , which rule handles duplicate values correctly?

  51. Question 51 of 60 Merge sort Hard

    A merge-sort variant always splits an input into fractions and , where , and merging costs . Ignoring rounding, what is the leading term of its comparison recurrence?

  52. Question 52 of 60 Merge sort Hard

    An array consists of already identified nondecreasing runs. If a balanced merge schedule combines these runs, what is the tight worst-case merge cost, including the case ?

  53. Question 53 of 60 Quick sort Hard

    For randomized quicksort on distinct keys, where each pivot is chosen uniformly from the current subarray, what is the exact expected number of key comparisons?

  54. Question 54 of 60 Quick sort Hard

    Quicksort is modified to recurse only on the smaller partition and process the larger partition by iteration. What are its worst-case running time and auxiliary call-stack space?

  55. Question 55 of 60 Quick sort Hard

    Three-way quicksort partitions elements into regions smaller than, equal to, and greater than the pivot, and does not recurse on the equal region. On an array of identical keys, what behavior results?

  56. Question 56 of 60 Quick sort Hard

    For randomized quicksort on distinct keys, what is the probability that every nontrivial recursive call chooses an extreme key and therefore produces a maximally unbalanced partition?

  57. Question 57 of 60 Arithmetic with large integers Hard

    Karatsuba multiplication replaces four half-size products with three half-size products. Assuming linear-time additions, which recurrence and complexity describe multiplication of two -digit integers?

  58. Question 58 of 60 Arithmetic with large integers Hard

    A three-way large-integer multiplication scheme evaluates enough points to use five recursive multiplications on inputs of size , with evaluation and interpolation work. What is its asymptotic complexity?

  59. Question 59 of 60 Arithmetic with large integers Hard

    A divide-and-conquer integer multiplication algorithm computes all four products of the high and low halves recursively. Even if its additions are optimized to linear time, what tight bound follows?

  60. Question 60 of 60 Arithmetic with large integers Hard

    For a power of two, suppose a Karatsuba-style implementation satisfies and . Which expression solves the recurrence exactly?

That's unit 2

Answer a few questions and your score shows up here.