Introduction to Divide and Conquer With Binary Search

Learn the divide and conquer technique to solve problems using binary search in a sorted array.

Divide and conquer is an algorithmic paradigm in which the problem is repeatedly divided into subproblems until we reach a point where each problem is similar and atomic, i.e., it can’t be further divided. At this point, we start solving these atomic problems and combining (merging) the solutions. So, divide-and-conquer solutions have the following three steps:

  1. Divide
  2. Conquer
  3. Merge

Let’s look at an example to grasp this concept better.

Binary search method

Consider a sorted array arr of n integers. We are required to find if a particular integer value exists in the given array or not.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy