Skip to content

Meet-In-The-Middle Ladder

This ladder is for the subset-search regime where 2^n is too large but splitting into two halves is still realistic.

Who This Is For

Use this ladder when:

  • the raw model is subset-like
  • n is around 35 to 45
  • bitmask DP feels too large, but the halves can still be summarized cleanly

Warm-Up

  • split one set into two halves
  • enumerate all half-sums
  • sort one side and binary-search complements

Core

  • subset-sum style MITM
  • best-feasible merge by sorting or hashing
  • decide whether MITM or DP is the cleaner exact route

Exact Repo Route

Compare Points Inside The Repo

How To Use This Bridge

  1. confirm the full state really factors into left half and right half
  2. design the half summary before enumerating anything
  3. make the merge cost explicit

External Practice