Advanced -> Meet-In-The-Middle
Split a subset-like exact search into two halves, enumerate exact half summaries, and merge them faster than full 2^n brute force.
- Topic slug:
advanced/meet-in-the-middle
- Tutorial page: Open tutorial
- Ladder page: Open ladder
- Repo problems currently tagged here:
1
- Repo companion pages:
3
- Curated external problems:
3
Microtopics
- half-enumeration
- subset-sums
- sort-and-merge
- hash-merge
- n-around-40
- sqrt-state-space
Learning Sources
Practice Sources
Repo Companion Material
Curated External Problems
Core
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| Meet in the Middle |
CSES |
Medium-Hard |
Mitm |
Exact Search; Sort-And-Merge |
Subset Enumeration; Binary Search |
Subset-Sum; Counting |
The cleanest internal anchor for the classic half-sum enumeration route. |
| Programming Contest |
AtCoder |
Medium-Hard |
Mitm |
Exact Search; Optimization |
Subset Enumeration; Binary Search |
Best-Feasible-Sum; Binary Search |
A standard best-sum-no-more-than-S route where the merge is about best feasible complement rather than multiplicity. |
Classics
| Problem |
Source |
Difficulty |
Context |
Style |
Prerequisites |
Tags |
Why it fits |
| SUBSUMS |
SPOJ |
Medium-Hard |
Mitm |
Exact Search; Counting |
Subset Enumeration; Sorting |
Subset-Sum; Range Counting |
A classic SPOJ benchmark for half-sum generation with a counting-flavored merge. |
Repo Problems
| Code |
Title |
Fit |
Difficulty |
Pattern |
Note |
Solution |
MEETINTHEMIDDLE |
Meet in the Middle |
primary |
medium-hard |
- |
Note |
Code |
Regeneration
python3 scripts/generate_problem_catalog.py