2908. Minimum Sum of Mountain Triplets I
Code
# Code
```python3 []
class Solution:
    def minimumSum(self, nums: List[int]) -> int:
        
        def left(i):
            y = 151
            for i in range(i):
                y = min(y,nums[i])
            return y

        def right(i):
            y = 151
            for i in range(i+1,len(nums)):
                y = min(y,nums[i])
            return y
            
        ans = 151
        for i in range(len(nums)):
            er = right(i)
            qw = left(i)
            if nums[i] > qw  and nums[i] > er :
                ans = min(ans , er + qw + nums[i])

        if ans == 151 : return -1
        return ans

```
['Python3']