Dynamic programmingExplained
State Compression DP
Pack a large state into a small integer.
Time
O(2ⁿ · n)
Extra space
O(2ⁿ)
Use it for
Broken-profile and subset problems.
Pack a large state into a small integer.
Time
O(2ⁿ · n)
Extra space
O(2ⁿ)
Use it for
Broken-profile and subset problems.