• + 1 comment

    problem has changed, but with javascript you can still do:

    return a.filter(x=>x<=0).length < k ? "YES" : "NO";