Tap here to switch tabs
Problem
Submissions

Problem: Minimum Sum of Mountain Triplets I

med
30 min
Try to solve the Minimum Sum of Mountain Triplets I problem.

Statement

You are given a 00 indexed integer array nums.

A triplet of indices (i, j, k) is called a mountain triplet if:

  • i << j << k

  • nums[i] << nums[j] and nums[k] << nums[j]

Return the minimum possible sum of a mountain triplet in nums. If no such triplet exists, return −1-1.

Constraints:

  • 3≤3 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Sum of Mountain Triplets I

med
30 min
Try to solve the Minimum Sum of Mountain Triplets I problem.

Statement

You are given a 00 indexed integer array nums.

A triplet of indices (i, j, k) is called a mountain triplet if:

  • i << j << k

  • nums[i] << nums[j] and nums[k] << nums[j]

Return the minimum possible sum of a mountain triplet in nums. If no such triplet exists, return −1-1.

Constraints:

  • 3≤3 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50