You are viewing a single comment's thread. Return to all comments →
And mine, like someone said, too easy with linq.
Console.WriteLine(a.Where(i => i <= 0).Count() < k ? "YES" : "NO");
Really the way to do it is to not build an array and just count and write yes once you reach k items at <= 0.
Seems like cookies are disabled on this browser, please enable them to open this website
Angry Professor
You are viewing a single comment's thread. Return to all comments →
And mine, like someone said, too easy with linq.
Really the way to do it is to not build an array and just count and write yes once you reach k items at <= 0.