Search
⌘K

Leetcode 312. Burst Balloons

Choose an order to remove elements from an array where bursting index i yields coins equal to nums[i-1]*nums[i]*nums[i+1] (treat out-of-bounds as 1), and return the maximum total coins. The reward depends on dynamic neighbors, so the core challenge is exploiting optimal substructure (interval/segment DP over subarrays) to search the best bursting sequence for n up to 300.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late January, 2025

Google

Google

Mid-level

Burst Balloons - Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons.

Comments

Your account is free and you can post anonymously if you choose.