C++ || BRUTE FORCE ||
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumSum(vector<int>& nums) {\n        int ans=INT_MAX;\n        int n=nums.size();\n        for(int i=0;i<n;i++){\n            for(int j=i+1;j<n;j++){\n                for(int k=j+1;k<n;k++){\n                    if(nums[i]<nums[j] and nums[k]<nums[j]){\n                        ans=min(ans,nums[i]+nums[j]+nums[k]);\n                    }\n                }\n            }\n        }\n        if(ans==INT_MAX)\n            ans=-1;\n        return ans;\n    }\n};\n```
['C++']