Sort by

recency

|

1998 Discussions

|

  • + 0 comments

    Locksmith explores the intriguing story of Angry Professor, highlighting themes of frustration, challenge, and unexpected lessons. This narrative captures how strong emotions can impact decisions and relationships while offering opportunities for growth and understanding. By examining reactions and problem-solving approaches, readers gain insights into managing conflict and turning difficulties into learning experiences. The story encourages reflection, empathy, and personal development, demonstrating that even challenging personalities can inspire valuable life lessons.

  • + 0 comments
     int count=0;
            for(int i=0;i<a.size();i++){
                if(a.get(i)<=0){
                    count++;
                }else{
                    continue;
                }
            }
            if(count>=k){
                return "NO";
            }
            return "YES";
    
  • + 0 comments

    PYTHON ONE LINER I am learning python

    def angryProfessor(k, a):
        # Write your code here
        return "YES" if sum(t<=0 for t in a)<k else "NO" 
    
  • + 0 comments

    Here is Hackerrank angry professor solution in Python, java, c++, c and javascript - https://programmingoneonone.com/hackerrank-angry-professor-problem-solution.html

  • + 0 comments

    There are three python ways to solve this in the code below:

    # count = 0
        # for stu in a:
        #     if stu <=0:
        #         count+=1
        # count = sum(stu <= 0 for stu in a)
        
        return "NO" if sum(stu <= 0 for stu in a) >= k else "YES"