Divide & Conquer Algorithm: Disalgo
Divide & Conquer Algorithm: Disalgo
Disalgo
Divide-and-Conquer Algorithm
Divide-and-conquer is a top-down
technique for designing algorithms that consists of dividing the problem into smaller subproblems hoping that the solutions of the subproblems are easier to find and then composing the partial solutions into the solution of the original problem.
that are similar to the original problem but smaller in size, Solve the sub-problem recursively (successively and independently), and then Combine these solutions to sub problems to create a solution to the original problem.
Binary Search
Binary Search is an extremely well-known
instance of divide-and-conquer paradigm. Given an ordered array of n elements, the basic idea of binary search is that for a given element we "probe" the middle element of the array. We continue in either the lower or upper segment of the array, depending on the outcome of the probe until we reached the required (given) element.