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.
I feel smartn't seeing this
Looks very simple, clear, and easy. Thank you! As for me: as always I created more complicated solution :)
Fantastic. I was trying to create this simple O(n) O(n) solution. Only when you see it do you realise how simple it is. Kicking myself, as I was almost there twice but deleted and went down other avenues.
Great work.
omg this is brilliant
Fantastic solution.
I create 2 monsters to solve that one.
dont see my answer .. you will die, looool
excellent solve
Hey @mildlyeastern,
That's a great question! It's referred to as a ternary. It's a one line conditional statement where the condition is followed the truthy evaluation followed by the else. So like this:
condition == true ? ifConditionWasTrue : elseIfItWasNot
aka
if (condition == true) {
return ifConditionWasTrue;
}else{
return elseIfItWasNot
}
Can someone explain to me what the ? and the : does in the return statement.
Is this solution as efficient as using iterators?
There isn't a difference in using
continue
overelse
in this example. Seems more of a stylistic choice here than anything else.Is there a reason to use continue instead of else?
whoa!!!! good one, mate.
Pretty Awesome! never would have thought of that :D
This comment is hidden because it contains spoiler information about the solution
Loading more items...