LeetCodechevron_rightCategorieschevron_rightdivide and conquer
call_split

divide and conquer

42 problems
Easy: 5Medium: 24Hard: 13

divide and conquer is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

#TitleDifficulty
4

Median of Two Sorted Arrays

Find the median of two sorted arrays using binary search for efficient O(log(min(m, n))) time complexity.

Hard
23

Merge k Sorted Lists

Merge k Sorted Lists requires efficiently combining multiple sorted linked lists into one using pointers and priority qu…

Hard
53

Maximum Subarray

Maximum Subarray is a classic state transition dynamic programming problem about deciding whether to extend or restart a…

Medium
105

Construct Binary Tree from Preorder and Inorder Traversal

Construct a binary tree using preorder and inorder traversal arrays, leveraging array scanning and hash table lookups.

Medium
106

Construct Binary Tree from Inorder and Postorder Traversal

Reconstruct a binary tree from given inorder and postorder arrays using array scanning and hash lookup to optimize recur…

Medium
108

Convert Sorted Array to Binary Search Tree

Pick the middle element as root at each step so the sorted array becomes a height-balanced BST with valid ordering.

Easy
109

Convert Sorted List to Binary Search Tree

Convert a sorted singly linked list into a height-balanced BST using pointer manipulation and divide-and-conquer recursi…

Medium
148

Sort List

Sort List requires sorting a singly linked list efficiently using pointer manipulation and merge sort for optimal perfor…

Medium
169

Majority Element

Find the majority element in an array, where the element appears more than n/2 times, using efficient algorithms.

Easy
190

Reverse Bits

Reverse a 32-bit unsigned integer by manipulating bits efficiently using a divide and conquer approach with careful bit …

Easy
191

Number of 1 Bits

Number of 1 Bits is a classic bit manipulation problem where clearing the lowest set bit gives the cleanest count.

Easy
215

Kth Largest Element in an Array

Find the kth largest element in an unsorted array using optimal approaches like Quickselect or heaps.

Medium
218

The Skyline Problem

The Skyline Problem requires calculating a city's silhouette using array manipulation and divide-and-conquer techniques …

Hard
240

Search a 2D Matrix II

Efficiently search for a target in a 2D matrix using binary search and matrix properties.

Medium
315

Count of Smaller Numbers After Self

Solve the Count of Smaller Numbers After Self problem using binary search and optimized algorithms.

Hard
324

Wiggle Sort II

Rearrange an array in a way that every odd-indexed element is greater than its adjacent even-indexed elements.

Medium
327

Count of Range Sum

Count the number of subarray sums within a given inclusive range using optimized divide-and-conquer techniques efficient…

Hard
347

Top K Frequent Elements

Find the k most frequent elements from an array using efficient algorithms like hashing and sorting.

Medium
372

Super Pow

Compute large exponentiations efficiently using modular arithmetic and divide-and-conquer techniques for this Super Pow …

Medium
395

Longest Substring with At Least K Repeating Characters

Find the length of the longest substring where every character appears at least k times using sliding window and divide-…

Medium
427

Construct Quad Tree

Construct a Quad-Tree from a binary matrix by recursively subdividing regions and tracking uniform states efficiently.

Medium
493

Reverse Pairs

Count the number of reverse pairs in a given integer array using efficient algorithms like binary search and merge sort.

Hard
558

Logical OR of Two Binary Grids Represented as Quad-Trees

Compute the logical OR of two binary matrices represented as Quad-Trees using recursive tree traversal and state propaga…

Medium
654

Maximum Binary Tree

Construct a maximum binary tree by recursively selecting the largest element and dividing the array into left and right …

Medium
889

Construct Binary Tree from Preorder and Postorder Traversal

Reconstruct a binary tree from preorder and postorder traversals using array scanning and hash lookup.

Medium
912

Sort an Array

Sort an array using an optimal algorithm, focusing on time and space complexity considerations.

Medium
918

Maximum Sum Circular Subarray

Find the maximum sum of a circular subarray using state transition dynamic programming, optimizing for wraparound cases …

Medium
932

Beautiful Array

Beautiful Array builds a valid permutation by recursively separating odd and even positions so no middle-average triple …

Medium
973

K Closest Points to Origin

Find the k closest points to the origin in a 2D plane using array operations and Euclidean distance calculations efficie…

Medium
1382

Balance a Binary Search Tree

This problem requires balancing a binary search tree using in-order traversal and state tracking techniques.

Medium
1569

Number of Ways to Reorder Array to Get Same BST

Determine the number of ways to reorder an array to get the same binary search tree (BST) from its insertion order.

Hard
1649

Create Sorted Array through Instructions

The problem asks to compute the cost of inserting elements into a sorted array using a series of instructions.

Hard
1738

Find Kth Largest XOR Coordinate Value

Compute the kth largest XOR coordinate in a 2D matrix using prefix sums, bit manipulation, and optimized selection techn…

Medium
1763

Longest Nice Substring

Find the longest nice substring in a given string using the sliding window technique with running state updates.

Easy
1982

Find Array Given Subset Sums

Reconstruct an array from given subset sums using divide and conquer approach and leveraging array properties.

Hard
1985

Find the Kth Largest Integer in the Array

This problem asks to find the kth largest integer in an array of string numbers, highlighting sorting and string-based c…

Medium
2179

Count Good Triplets in an Array

Count Good Triplets in an Array requires tracking index orders across two permutations efficiently using binary search.

Hard
2343

Query Kth Smallest Trimmed Number

Solve the Query Kth Smallest Trimmed Number problem by efficiently trimming and sorting strings in an array to answer qu…

Medium
2407

Longest Increasing Subsequence II

Determine the longest increasing subsequence in an array where consecutive elements differ by at most k using dynamic pr…

Hard
2426

Number of Pairs Satisfying Inequality

Count pairs in two arrays satisfying a given inequality condition using binary search over the valid answer space.

Hard
3165

Maximum Sum of Subsequence With Non-adjacent Elements

Compute the maximum sum of a subsequence where no two adjacent elements are selected after each array update efficiently…

Hard
3537

Fill a Special Grid

Fill a Special Grid uses recursive divide-and-conquer to populate a 2^n x 2^n matrix with sequential integers uniquely i…

Medium

Related Patterns

Divide and Conquer LeetCode Problems: 42 Solutions