Burst Balloons
HardLeetCodeAdvanced DP (Bitmask, Digit, Interval)
Approach hintTry it first, then revealHide
Choose the balloon burst last in an interval rather than first. With a 1 padded at both ends, dp[l][r] tries every k strictly between l and r as the last one, whose neighbours are then exactly l and r. O(n^3).