Problems / Burst Balloons
Hard

Burst Balloons

Hard 22 submissions 50 coins +200 XP
Divide and Conquer Dynamic Programming
Problem Description
Balloon `i` has value `nums[i]`. Bursting balloon `i` earns `left × nums[i] × right`, where `left` and `right` are its current neighbours (treat missing neighbours as `1`). Burst all balloons and return the maximum total you can earn. **Example 1:** ``` Input: nums = [3, 1, 5, 8] Output: 167 ``` **Example 2:** ``` Input: nums = [1, 5] Output: 10 ``` **Example 3:** ``` Input: nums = [7] Output: 7 ```
Constraints
- `1 <= nums.length <= 300` - `0 <= nums[i] <= 100`

Need help?

Connect with expert programmers for real-time collaborative coding, video meetings, and whiteboard sessions via CodeConnect.

Video Call Whiteboard Live Coding Screen Share