Java DP, easy to understand. Just few lines
Given vertices [0, n-1]\uFF0Cchoose one of them between 0 & n-1, say vertice i. \n\nThe whole polygon could be splited into 3 parts,\n1. A triangle formed by 3 
Given vertices [0, n-1]\uFF0Cchoose one of them between 0 & n-1, say vertice i. \n\nThe whole polygon could be splited into 3 parts,\n1. A triangle formed by 3 vertices  0, i, n-1\n2. A polygon formed by vertices [0, i]\n3. A polygon formed by vertices [i, n-1]\n\nNow the problem is transformed into "get the minimum value of sum( One triangle + Two sub problems)"\n~~~\nprivate int triangles(int[] A, int lo, int hi) {\n    if (hi-lo+1<3) return 0; //less than 3 vertices\n\tint ans = Integer.MAX_VALUE;;\n    for (int i=lo+1; i<hi; i++) {\n        ans = Math.min(ans, A[lo]*A[i]*A[hi] + triangles(A, lo, i) + triangles(A, i, hi));\n    }\n    return ans;\n}\n\nreturn triangles(A, 0, A.length-1);\n~~~\n\nFor optimization, all you need to do is add cache into above logic. \n~~~\nclass Solution {\n    int[][] memo;\n    \n    public int minScoreTriangulation(int[] A) {\n        memo = new int[A.length][A.length];\n        Arrays.stream(memo).forEach(x -> Arrays.fill(x, -1));\n        return triangles(A, 0, A.length-1);\n    }\n    \n    private int triangles(int[] A, int lo, int hi) {\n        if (hi-lo+1<3) return 0; //less than 3 vertices\n        if (memo[lo][hi]>=0) return memo[lo][hi];\n        int ans = Integer.MAX_VALUE;;\n        for (int i=lo+1; i<hi; i++) {\n            ans = Math.min(ans, A[lo]*A[i]*A[hi] + triangles(A, lo, i) + triangles(A, i, hi));\n        }\n        memo[lo][hi]=ans;\n        return ans;\n    }\n}\n~~~\n\n
[]