Divide and conquer


concept

Recursivly break down a problem into two or more sub-problems. Obtain solution to original problem by combining these solutions.

(The above image is from ASU SER501.)


[Medium] No.240 Search a 2D Matrix II

Approach: Divide and conquer (recursive)

Time Complexity: O(NlogN)

Space Complexity: O(logN)