1. Given an array of integers, you have to find whether the given sequence contains any tiny-tiny-big sequence. 2. Tiny-Tiny-Big sequence : Ai<Ak<Aj where i<j<k 3. You have to return true if the given array contains any such sequence otherwise false. Example In A=[3,1,4,2] : [1,4,2] is tiny-tiny-big seq (A1<A3<A2)
Input Format
Integer array
Output Format
boolean
Constraints
size of array < 15000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
66 71 39 22 44 23 48 79 16 38 22 4 51 47 32 20 71 13 32 44 40 11 47 93 41 98 66 47 36 1 92 62 67 98 14 69 64 30 5 31 81 64 68 76 27 82 0 84 94 81 49 29 44 67 19 84 56 46 87 71 13 16 42 20 34 60 36
Output
true