Solution in C
Code
# Code
```c []
int minimumSum(int* nums, int numsSize) {
    int ans = INT_MAX , n = numsSize;
    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]) {
                    ans = fmin(ans , nums[i]+nums[j]+nums[k]);
                }
            }
        }
    }
    if(ans==INT_MAX) return -1;
    return ans;
}
```
['Array', 'C']