Created
May 19, 2022 07:14
-
-
Save rachidelaid/e556cadf6a05bbcd14b79f78d2d2e37f to your computer and use it in GitHub Desktop.
this is the solution to the angry teacher algo on hackerrank https://www.hackerrank.com/challenges/angry-professor/problem?isFullScreen=true
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function angryProfessor(k, a) { | |
const onTimeStudents = a.filter(s => s <= 0).length | |
return onTimeStudents >= k ? "NO" : "YES" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment