Why it is showing "Your code might be failing for larger test-cases"


#1
class Solution:
    # @param A : list of integers
    # @return an integer
    def perfectPeak(self, A):
        m=len(A)
        if(m<3):
            return(0)
        for i in range(1,m-1):
            f=A[i]
            for j in range(0,i):
                if(A[j]>f):
                    break
            else:
                for j in range(i+1,m):
                    if(A[j]<f):
                        break
                else:
                    return(1)
        return(0)

#2

This will give TLE for larger cases as worst case complexity is O(n2).