Why this Python solution isn't O(N)


#1
`def perfectPeak(self, A):
        for i in range(1,len(A)-1):
            if (A[i]>max(A[:i])) and (min(A[i+1:])>A[i]):
                return 1
        return 0`