0546. Remove Boxes
https://leetcode.com/problems/remove-boxes
Description
You are given several boxes
with different colors represented by different positive numbers.
You may experience several rounds to remove boxes until there is no box left. Each time you can choose some continuous boxes with the same color (i.e., composed of k
boxes, k >= 1
), remove them and get k * k
points.
Return the maximum points you can get.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= boxes.length <= 100
1 <= boxes[i] <= 100
ac
Last updated