Maximum Number of Operations With the Same Score II
Remove two numbers from the front, the back or one of each end, keeping every removal at the same score; memoize the intervals that remain.
Remove two numbers from the front, the back or one of each end, keeping every removal at the same score; memoize the intervals that remain.