Increasiing decreasing sequence

mera test passed kyo nhi ho rha please help kro

please provide me the code
nonetheless, i will also mention the logic to be used
zero s start karo and dekho decreasing hai,
jis bhi point pe s[i+1] > s[i] miljae
vaha s ascending check kro, agar kisi point pe dobara decreasing hojae toh false return
s[i+1] < s[i] ye ajae toh false
agar i==n-1 hojae toh return return true