#3637
Trionic Array I
easy · 49.5% accepted · 469 likes · top 36%
Description
You are given an integer array nums of length n.
An array is trionic if there exist indices 0 < p < q < n − 1` such that:
nums[0...p]` is strictly increasing,
nums[p...q]` is strictly decreasing,
nums[q...n − 1]` is strictly increasing.
Return true if nums is trionic, otherwise return false`.
Solution