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
Also, I don't think this solution accounts for wheel straights either. Basically, just need more test cases to invalidate solutions like these.
Yep. This would make this not a "great solution".
Why is 'null' expected?
This solutiom is failed with
[[16,null,null],[11,null,15],[4,null,1]]
Expected: 'null', instead got: '[[16, 0, 15], [11, 5, 15], [4, 26, 1]]'
Please check if you wish
I think the row "result2 = result;" should be "result2 += result;",
otherwise in case like 'one million and one thousand', the result2 would be 1000000 for the million, but it would be overridden by the 1000. so you'll get 1000 and not 1001000.
Great solution.
But I'm not quite sure the cheking for straight (numbers_in_sequence) is true.
You check it by the sum of the card, so if you have [3,4,5,6,7] the sum equals 25, so the function returns true.
BUT, if you have [3,3,5,7,7] the sum is the same - 25, so you'll get it as a stright, while it's not.