# Divide and Conquer Algorithms

Here, We will discuss about divide and conquer algorithms, their strategy, pros and cons of divide and conquer, applications of divide and conquer algorithm.

### What is Divide and Conquer Algorithm ?

Some problems failed to provide optimal solutions. Among those problems, some are easily solved by using the Divide and Conquer technique.

Divide and Conquer is an important algorithm design technique based on recursion.

The Divide and Conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same type, until they become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem.

### What is Divide and Conquer Strategy?

In Divide and Conquer, we solve problem recursively, apply three steps at each level of the recursion:

1. Divide: Breaking the problem into a number of sub-problems that are smaller instances of the same problem.
2. Conquer: Recursively solving these sub-problems.
3. Combine: Combining solutions to the sub-problems into the solution for original problem.

### Does Divide and Conquer Always Work?

It is not possible to solve all the problems with the Divide and Conquer technique because for all problem it is not possible to find the sub-problems which are same size.

So, Divide and Conquer technique is not choice for all problems.

### Applications of Divide and Conquer

1. Quick Sort
2. Merge Sort
3. Counting inversions
4. Binary Search
5. Finding Min and Max
6. Median Finding
7. Closest Pair problem
8. Strassen’s algorithms for Matrix Multiplication

#### Merge k Sorted Lists LeetCode Solution

You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all…

#### Majority Element LeetCode Solution

Given an array nums of size n, return the majority element. The majority element is…

#### Median of Two Sorted Arrays LeetCode Solution

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time…

#### Quick Sort

Here, We will discuss about Quick sort in C, their algorithm, implementation in C, time…

#### Merge Sort

Here, We will discuss about Merge Sort in C, their algorithm, implementation code in C,…

### Want to Contribute:-

If you like “To The Innovation” and want to contribute, you can mail your articles to 📧 contribute@totheinnovation.com. See your articles on the main page and help other coders.😎

### 2 thoughts on “Divide and Conquer Algorithms”

1. It’s an awesome article for all the internet people; they will take benefit
from it I am sure.

2. Awesome article.

Scroll to Top