Applications of Divide and Conquer Algorithm
The following are some standard algorithms that follow Divide and Conquer algorithm:
- Quicksort is a sorting algorithm that picks a pivot element and rearranges the array elements so that all elements smaller than the picked pivot element move to the left side of the pivot, and all greater elements move to the right side. Finally, the algorithm recursively sorts the subarrays on the left and right of the pivot element.
- Merge Sort is also a sorting algorithm. The algorithm divides the array into two halves, recursively sorts them, and finally merges the two sorted halves.
- Closest Pair of Points The problem is to find the closest pair of points in a set of points in the x-y plane. The problem can be solved in O(n^2) time by calculating the distances of every pair of points and comparing the distances to find the minimum. The Divide and Conquer algorithm solves the problem in O(N log N) time.
- Strassen’s Algorithm is an efficient algorithm to multiply two matrices. A simple method to multiply two matrices needs 3 nested loops and is O(n^3). Strassen’s algorithm multiplies two matrices in O(n^2.8974) time.
- Cooley–Tukey Fast Fourier Transform (FFT) algorithm is the most common algorithm for FFT. It is a divide and conquer algorithm which works in O(N log N) time.
- Karatsuba algorithm for fast multiplication does the multiplication of two binary strings in O(n1.59) where n is the length of binary string.
Introduction to Divide and Conquer Algorithm – Data Structure and Algorithm Tutorials
Divide and Conquer Algorithm is a problem-solving technique used to solve problems by dividing the main problem into subproblems, solving them individually and then merging them to find solution to the original problem. In this article, we are going to discuss how Divide and Conquer Algorithm is helpful and how we can use it to solve problems.
Table of Content
- Divide and Conquer Algorithm Definition
- Working of Divide and Conquer Algorithm
- Characteristics of Divide and Conquer Algorithm
- Examples of Divide and Conquer Algorithm
- Complexity Analysis of Divide and Conquer Algorithm
- Applications of Divide and Conquer Algorithm
- Advantages of Divide and Conquer Algorithm
- Disadvantages of Divide and Conquer Algorithm