Creating Two arrays with min from left and min from right then calculating the sum....
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```java []\nclass Solution {\n    public int minimumSum(int[] nums) {\n        int sum=Integer.MAX_VALUE;\n        int minarray1[]=new int[nums.length];\n        int min=Integer.MAX_VALUE;\n        for(int i=0;i<nums.length;i++)\n        {\n            if(nums[i]<min)\n            min=nums[i];\n            minarray1[i]=min;\n        }\n        min=Integer.MAX_VALUE;\n        int minarray2[]=new int[nums.length];\n        for(int i=nums.length-1;i>=0;i--)\n        {\n            if(nums[i]<min)\n            min=nums[i];\n            minarray2[i]=min;\n        }\n        for(int i=1;i<nums.length-1;i++)\n        {\n            if(nums[i]>minarray1[i-1]&&nums[i]>minarray2[i+1])\n            {\n                if(nums[i]+minarray1[i-1]+minarray2[i+1]<sum)\n                {\n                    sum=nums[i]+minarray1[i-1]+minarray2[i+1];\n                }\n            }\n            \n        }\n        if(sum==Integer.MAX_VALUE) return -1;\n        return sum;\n    }\n}\n```
['Java']