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.
This comment is hidden because it contains spoiler information about the solution
Yes, why wouldn't it?
{}
gets converted toString({})
so it can be compared to the character.String({})
returns[object Object]
, of which the first character is a[
which has a charcode of 91.This solution doesn't work. It only checks two things:
But test cases do not contain such an elementary check. As always :)
he's probably lucky
Increased random test amount to 100
Edit - not sure what's going on there, but you shouldn't have to make sure that the array is all the same. I just use localCompare.
Ok. I've added your sample to the description. I hope it helps. If not, I have no idea how to explain it better :P Skipping is an option too :P
Google some online game of type 'Plumber - fix the pipes' and play it for a moment. It should help.
If one (or more) ends of pipe is connected to a watter source and at least one of ends finishes inside of the field, then it's leaking.
I like currying! :]
Partial application is often a lot cleaner than endless fat arrow wrapping.
Instruction is clear. A hand has 5 cards. In this example, 4 of them are in the rank (four-of-a-kind) -> so there is 1 remaining card in the hand, regardless whether the players is holding this card or if it's a shared one.
Also, from description:
" Each player makes the best poker hand possible using five of the seven available cards (community cards + the player's hole cards)"
So all information is available to you.
If we want to be nitpicky, then highest_ranked_card_remaining also does not necessarily break a tie, because it can be a card from the table, common to both players. Or not?
Loading more items...