Divide and Conquer Algorithms: difficulty 4

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A programmer proposes (a) searching an unsorted log with binary search, (b) sorting two separately collected numeric lists and then merging them, and (c) finding the maximum of a nonempty list by returning its element if it is a singleton; otherwise splitting it into two nonempty halves as equal in size as possible, recursively finding each half's maximum, and returning the larger subanswer. For each proposal, state whether the described divide-and-conquer idea is valid as written and give the key reason or missing precondition.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Divide and Conquer Algorithms Questions: