Analyzing Divide and Conquer

In the following algorithm, what is the "conquer" step of the divide and conquer approach?

You are trying to sort a list of basketball players by the number of points they scored in a game. To do this you divide the list into smaller lists consisting of two players each. You compare the two players in each list and sort them by who has the higher number of points. You do this comparison for every pair of lists and combine the lists to make bigger sorted lists until the entire list is sorted.

Comparing the elements within the smaller lists Combining the smaller lists into a larger sorted list Dividing the larger list into smaller lists

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Bayu Wiratama
Nov 14, 2019

To solve the question, we need to know the definition of divide, conquer, and combine.

  • Divide : dividing the initial problem itu little subproblems. basically, we break down the big problem into smaller subproblems.
  • Conquer : solving the subproblems.
  • Combine : combining the result produces from "conquering" the subproblems and use it to solve the initial problem.

The first option has the word "dividing" in it, so it's a divide phase. The second one has the word "combining" in it, so it's a combine phase. Although the third option doesn't has any word related to "conquer", but the option shows that it's trying to solve the subproblem, so it is a conquer phase. And so, the answer is option number three.

obvious, man)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...