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.
You're welcome, quite challenging enough to figure out by the way
Thank you! :]
Very nice mathy kata, well done...
https://docs.codewars.com/authoring/guidelines/submission-tests#performance-tests
If you can enforce the same time complexity with 100 tests up to 500 billion, that's probably the better way. Larger inputs generally lead to larger differences in runtime for different time complexities, meaning the user experience is much better with a compliant solution, while uncompliant solutions consistently time out.
Solutions passing in 10 seconds is bad design, and bad UX. ( Note that I don't know how long the test suite actually takes for the example solution. )
A ludicrous number of tests often requires micro-optimisation, which is much less interesting than achieving a better time complexity.
So I thought 50 was high. Turns out it's low.
Obligatory movie reference which would allow for
hoursUntilSunrise <= 720
.Still, missed chance to explain in the description this is possible in this world. :P
ETA: you mean a polar summer? last day of a night is an interesting concept though.
It's possible on the last day of a polar night.
Please do up the description a bit. Markup, spacing, "you also dies".
Fifty hours until sunrise? Missed chance to explain in the description in what world this is possible.
For a white kata, test failures should show their inputs.
approved
C++ Translation. Directly based off the C/Python version/s.
If you can hardcode it, you've solved it. More tests would be more interesting than random tests, but somewhere in the 70s you run out of integers.
I feel that for a 5 kyu, there should be some sort of mechanism for testing against a hard-coded answer, but for Haskell especially, most of the difficulty comes from working in IO, so I'm fine with no random tests.
Loading more items...