Rising Triple
Return True if nums contains three positions i < j < k with nums[i] < nums[j] < nums[k]: three strictly rising values that appear in this order, not necessarily next to each other. Otherwise return False.
Equal values never count as rising, so [1, 1, 2] gives False.
Example 1
nums [2,1,5,0,4,6]
returns true
Positions 1, 4 and 5 hold 1, 4 and 6.
Example 2
nums [5,4,3,2]
returns false
The values only go down.
Constraints
0 <= len(nums) <= 100-1000 <= nums[i] <= 1000
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.