Python solution, with simple explanation
\nclass Solution:\n    def maxCoins(self, nums: List[int]) -> int:                \n        # number of real balloons ( no padding fake ones)\n        n = len(n
```\nclass Solution:\n    def maxCoins(self, nums: List[int]) -> int:                \n        # number of real balloons ( no padding fake ones)\n        n = len(nums)\n        \n        if n <= 0:\n            return 0\n\n        # add 1 padding (fake balloon) on each side\n        nums = [1] + nums + [1]\n        \n        # number of all balloons (fake and real)\n        m = len(nums)\n        \n        # create table with default value 0\n        dp = [[0 for x in range(m)] for y in range(m)]\n        \n        # fill dp table with sliding window\n        \n        # create window size from 1 till amount of real balloons, (-1 to be exclude the fake right balloon padding)\n        for window_size in range(1, m-1):\n            # left border slides from 1 to the end until the right border hits the last real balloon\n            for left in range(1, (m - window_size)):\n                # right border is the left border plus the windows size ( -1 to only use balloons in window)\n                right = left + window_size - 1\n                # go from left to right ( +1 to include the right balloon)\n                # i is the index of the balloon which gets burst last in the selected window (left,right)\n                for i in range(left,right+1):\n                    # max sum of the values left to i in the selected window\n                    l_value = dp[left][i-1]\n                    # max sum of the values right to i in the selected window\n                    r_value = dp[i+1][right]\n                    # calculate the sum if balloon at i gets bursted last (meaning all other elements in the window are not existend)\n                    element_value = nums[left-1] * nums[i] * nums[right+1]\n                    # add up all the results\n                    i_sum = l_value + element_value + r_value\n                    \n                    # fill the table with the max value for the selected window\n                    dp[left][right] = max(dp[left][right], i_sum)\n                    \n\n        return dp[1][n]         \n```\n\nhttps://www.youtube.com/watch?v=uG_MtaCJIrM : Great tutorial which helped me to understand this problem
['Dynamic Programming', 'Python']