C# bruteforse solution
Complexity\n- Time complexity:\nO(n^3)\n\n- Space complexity:\nO(1)\n\n# Code\ncsharp []\npublic class Solution \n{\n    public int MinimumSum(int[] nums) \n   
# Complexity\n- Time complexity:\nO(n^3)\n\n- Space complexity:\nO(1)\n\n# Code\n```csharp []\npublic class Solution \n{\n    public int MinimumSum(int[] nums) \n    {\n        int sum = Int32.MaxValue;\n        for (int i = 0; i < nums.Length - 2; i++)\n        {\n            int ni = nums[i];\n            for (int j = i + 1; j < nums.Length - 1; j++)\n            {\n                int nj = nums[j];\n                for (int k = j + 1; k < nums.Length; k++)\n                {\n                    int nk = nums[k];\n                    if (ni < nj && nk < nj)\n                    {\n                        int s = ni + nj + nk;\n                        if (s < sum) { sum = s; }\n                    }\n                }\n            }\n        }\n\n        return sum != Int32.MaxValue ? sum : -1;\n    }\n}\n```
['C#']