We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
for _ in range(int(input())):
n = int(input())
l = list(map(int,input().split()))
result = "Yes"
for i in range(1,n-1):
if(l[i] > l[i-1] and l[i] > l[i+1]):
result = "No"
break
print(result)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Piling Up!
You are viewing a single comment's thread. Return to all comments →
Here, it's my code!