Brute Force approach 
Approach :- Brute Force
ComplexityCode
Approach :- Brute Force
Complexity

    Time complexity:O(n^3)

    Space complexity:O(1)


# Code
```cpp []
class Solution {
public:
    int minimumSum(vector<int>& nums) {
        int result=INT_MAX,n=nums.size();
        for(int i=0;i<n-2;i++) {
            for(int j=i+1;j<n-1;j++) {
                for(int k=j+1;k<n;k++) {
                    if(nums[i]<nums[j] && nums[k]<nums[j]) {
                        result = min(result, nums[i]+nums[j]+nums[k]);
                    }
                }
            }
        }
        if(result==INT_MAX){
            return -1;
        }    
        return result;
    }
};
```
['Array', 'C++']