Divide-conquer

12 articles

dsa2 min read

Construct Quad Tree

Build a quad tree from a 2D grid by recursively checking if a region is uniform and splitting into four quadrants.

Read →
dsa2 min read

Google — Count Inversions (Modified Merge Sort)

Count the number of inversions in an array (pairs where i < j but arr[i] > arr[j]) using modified merge sort in O(n log n). Google uses this to test deep algorithm understanding.

Read →