Simplest Python Solution 9 lines


#1

def solve(self, A):
low=-1
high=A[0]
for i in range(1,len(A)):
if A[i-1]<A[i]:
low=A[i-1]
high=A[i]
if A[i]<low:
return 0
return 1