• + 0 comments

    ** Python Solution **

    def angryProfessor(k, a):

        a.append(1)
    a_sorted = sorted(a)
    i = a_sorted.index(1)
    
        return 'NO' if i >= k else 'YES'