Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
lamda operator combined with ternary expression
It checks, if both values are above 0, if so, it calculates results, if any of the numbers are below 0, result is 0.
In logical sense of this task, if 0 classmates ask him to do any amount of work ( none of them asks), there is no work to be done, if 1+ calssmates ask him to do 0 or less work, there is still no work to be done.
is this correct given that he used && and it was spcified "or" in the task.
No problem ;-)
My bad. Missed the first condition. Sorry)
Can you explain why you think it returns the wrong answer?
The call you mention will return true, as expected I would think.
But maybe I see it wrong?
this solution gets wrong answer when Solve("test", "test") is called;