Easy Python Solution
Code
# Code
```python3 []
class Solution:
    def minimumSum(self, nums: List[int]) -> int:
        n = len(nums)
        if n < 3:
            return -1
            
        pre_min, suf_min = [0] * n, [0] * n
        pre_min[0], suf_min[n - 1] = nums[0], nums[-1]
        res = float('inf')

        for i in range(1, n):
            pre_min[i] = min(nums[i], pre_min[i - 1])

        for i in range(n - 2, -1, -1):
            suf_min[i] = min(nums[i], suf_min[i + 1])

        for i in range(1, n - 1):
            if suf_min[i + 1] < nums[i] and nums[i] > pre_min[i - 1]:
                res = min(res, pre_min[i - 1] + nums[i] + suf_min[i + 1])

        return res if res != float('inf') else -1
```
['Python3']