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.
fixed
Why is it shaped like a butt plug?
Very nice. This is as close to an "objectively correct" solution as I can think. Proper use of relatively obscure built-in methods for which this problem is a textbook use case example.
Great job on finding some hardcore edge cases for the basic tests.
I WOULD be ashamed of having hardcoded the last few tests, IF my solution wasn't already passing all 100 random tests like 90% of the time. Maybe one day I'll get back to it and try to finish a proper solution.
Still, super stoked to have solved my first 1 kyu kata and ranked up to 2 kyu.
Worked like a charm. Thank you!
I'm guessing it's because it's strictly following the principle of single responsibility. Every function does exactly one thing. But idk, doesn't look great to me.
The right hand side of the
||
is only evaluated if the left hand side is zero (a falsy value). So the sorting prioritizescount
(objects with higher count come first), and when bothcount
s are equal, the next condition is used (alphabetical sorting, bysrc
and then bychar
).Was pleasantly surprised that this didn't require any fancy optimization tricks or mathematical simplifications.
This makes me agree with the comment below that this is 6kyu max, but then I remember that most people are freaked out by the big math symbols xD
if the tax is 12% for example (t = 0.12), then what remains is 88% of your earnings. 1-t = 0.88. This is the number by which you should multiply your earnings.
It definitely does not require regex.
1kg makes up 1% of 100kg, but the same 1kg makes up 2% of 50kg.
This comment is hidden because it contains spoiler information about the solution
I'm completely at a loss here on how to get started, or even what I should do (and judging by the unanswered comment from 4 years ago with 8 upvotes, I'm not the only one).
From glancing at the tests, it's clear that we should find the inverse of the makeLogin function.
I've solved other decryption kata where we could play around with the encrypting function in order to deduce the encryption algorithm, but that seems to be forbidden here.
I feel like this deserves some extra clarification in the instructions.
LMAO good one
My solution passes all of the 100+ randomized tests, but fails on fixed test #7, which I suspect is the same one user szpakusik posted 2 years ago (see a few comments below).
Don't know how to access the test parameters, but the output was
'Rocky has won the fight.' should equal 'Missile Bob has won the fight.'
Loading more items...