Best code ever
\n# Code\njava []\nclass Solution {\n    public int minimumSum(int[] nums) {\n       int minSum = Integer.MAX_VALUE;\n       int n = nums.length;\n       for(in
\n# Code\n```java []\nclass Solution {\n    public int minimumSum(int[] nums) {\n       int minSum = Integer.MAX_VALUE;\n       int n = nums.length;\n       for(int i=0;i<n-2;i++){\n        for(int j=i+1;j<n-1;j++){\n            for(int k=j+1;k<n;k++){\n              int  min = nums[i]+nums[j]+nums[k];\n              if((nums[j]>nums[i] && nums[j]>nums[k])&&(minSum>min)) minSum = min;\n            }\n        }\n       } \n       if(minSum == Integer.MAX_VALUE) return -1;\n       return minSum;\n    }\n}\n```
['Java']