Burst Balloons Problem

Burst Balloons Problem — ExecCode Hard DSA Practice

Solve the Burst Balloons problem on ExecCode. Free online hard DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given n balloons with numbers on them. Bursting balloon i gives coins = nums[left]nums[i]nums[right]. Return the maximum coins you can collect by bursting all balloons.

Examples

Input nums = [3, 1, 5, 8]; Output 167

Constraints

1 ≤ n ≤ 300 0 ≤ nums[i] ≤ 100

Practice Burst Balloons free on ExecCode. Browse DSA problems, topic map, and placement guides.