You are given an integer array nums of length n.
A subarray nums[l...r] is called trionic if there exist two indices p and q with l p q r n such that:
nums[i] nums[i + ] for all l i p
nums[i] nums[i + ] for all p i q
nums[i] nums[i + ] for all q i r
Return the maximum possible sum of any trionic subarray in nums.
Constraints:
nums.length
nums[i]
It is guaranteed that at least one trionic subarray exists.
You are given an integer array nums of length n.
A subarray nums[l...r] is called trionic if there exist two indices p and q with l p q r n such that:
nums[i] nums[i + ] for all l i p
nums[i] nums[i + ] for all p i q
nums[i] nums[i + ] for all q i r
Return the maximum possible sum of any trionic subarray in nums.
Constraints:
nums.length
nums[i]
It is guaranteed that at least one trionic subarray exists.