[Solved] Minimum Sum of Mountain Triplets II C++, Java , Python
You are given a 0-indexed array nums of integers. A triplet of indices (i, j, k) is a mountain if: Return the minimum possible sum of a mountain triplet of nums. If no such triplet exists, return -1. Example 1:Input: nums = [8,6,1,5,3] Output: 9 Explanation: Triplet (2, 3, 4) is a mountain triplet…