Skip to main content
Burst Balloons | AlgoCracked
AlgoCracked
ProblemsBurst Balloons
Hard58.0% acceptance
Dynamic ProgrammingArrayDivide And ConquerInterval Dp

Burst Balloons

You are given nums , where nums[i] is the number painted on balloon i . You burst all the balloons one at a time. When you burst balloon i , you collect nums[left] nums[i] nums[right] coins, where left and right are the balloons adjacent to i at that moment . If a neighbour is out of bounds (already burst or beyond the ends), treat its value as 1 . Return the maximum coins you can collect. Input format Input is [nums] (a single array), e.g. [[3,1,5,8]] .

Loading workspace…