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.
obvious, but hard. Writing in in an object oriented approach is more accessible to most programmers I guess. For me too, I'd die trying to find a correct recursive algorithm for this :P
@epicshaner If you did with JS or TS, you can check mine. I'm learning clean code stuff and did this kata for training so it should be quite easy to understand.
I love that someone actually gave that "Best Practices".
I understand nothing
only if length of array was not 4 :D
just because you can, and others can learn the features of JS (or other languages).
In real work you shouldnt make everything one-liners, you should make code as clear to read for others as possible, at the same time not making it too long. But here we are for the purpose of training and learning language.
it's not a "make the shortest variable names possible" contest. Call your variables in a way so that others can intuitively know what is inside them.
yeah, you're right. Thanks :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
im at 128... :D
more test cases please, because you can solve kata without following instructions. Or at least modify this one, so that the set of players each day is the same:
[['AB', 'CD', 'EF', 'GH'], ['AC', 'BD', 'EG', 'FH'], ['AD', 'CE', '', 'B'], ['AE', 'BG', 'CH', 'FD']]
to
[['AB', 'CD', 'EF', 'GH'], ['AC', 'BD', 'EG', 'FH'], ['ADGF', 'CEH', '', 'B'], ['AE', 'BG', 'CH', 'FD']]
Exponential function is e^x
ok, my algorithm was correct. If somebody struggles with the same thing: use int( number ) or // instead of / when dividing or subtracting a huge number (even though division should result in an integer). I have no idea why, but it works :P
is there a reason why for small numbers in random tests it works and for large numbers there is a tiny relative difference (like 10 to 1000 when the number is for instance 1294351675530507022), apart from that i did it wrong?
this kata is funny. You just put random huge numbers in the ranges of loops and it works if numbers are high enough :D
Loading more items...