Please help it not accepting two tc

hey @kailash_01 ur logic is wrong in this question you have to check whether array is first in dec order then inc order . i dont think your code is doing this
refer this for help https://ide.codingblocks.com/s/236132

i think my logic is right as it accepting 7 tc out of 9 i am stuck at coener cases. please tell my mistake

its by chance passing coz you just have to print true or false :sweat_smile: @kailash_01

@kailash_01,
Check your code on this,
5
5 4 3 4 5

Ans=true