1039. Minimum Score Triangulation of Polygon
Last updated
Last updated
https://leetcode.com/problems/minimum-score-triangulation-of-polygon
You have a convex n
-sided polygon where each vertex has an integer value. You are given an integer array values
where values[i]
is the value of the ith
vertex (i.e., clockwise order).
You will triangulate the polygon into n - 2
triangles. For each triangle, the value of that triangle is the product of the values of its vertices, and the total score of the triangulation is the sum of these values over all n - 2
triangles in the triangulation.
Return the smallest possible total score that you can achieve with some triangulation of the polygon.
Example 1:
Example 2:
Example 3:
Constraints:
n == values.length
3 <= n <= 50
1 <= values[i] <= 100