can anyone please explain the problem and how to approach it .Despite having seeing the bitonic sequence video I’m not able to understand how it works.
Increasing decreasing sequence
hi rohan
u have to first find strictly decreasing than increasing
no think u have
1 2 3 4 5
now only 1 number can be consider as strictly inc/dec
so u can split like this
1 2 3 4 5
also take
5 4 3 2 1
5 4 3 2 1
now if u have 5 4 1 2 3
then check form i =0
wheather a[i]>a[i+1]
and when it became false
check for a[i]<a[i+1]
for i reaches end then u find a sequancce
Sharad could you please give me one example where it is false and where it is true.
6 5 3 4 2 1
this gave false
how it is false please Sharad could you explain?
6 5 3 dec
4 2 1 is not inc
also say
6 5 dec
3 4 2 1 not inc