• + 0 comments

    Here is my one line Python solution! If there are less students that show up on time than the threshold, we return "YES", otherwise there are enough students and we return "NO".

    def angryProfessor(k, a):
        return "YES" if len([i for i in a if i <= 0]) < k else "NO"