You need to sign in or sign up before continuing.×
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.
No, because there is more space between 5 and 10 (5) than between 1 and 5 (4). First you maximize the space, then if there is a tie, you chose the closest to the exit.
Since you enjoy sequences, here's a puzzle for you: Can you figure out the next values in this sequence and what they represent?
[-1, -1, -1, -1, ...]
Bonus question: does the accumulated sum of this sequence diverge towards "negative infinity"?Hold on a moment. A puzzle provides some clues, but you need to deduce the specifications on your own. Aren't you familiar with this basic concept?
There's no valid kata issue presented. You don't explain how these "things" are wrong. If you carefully analyze the example, it should make sense. Keep in mind that this is a puzzle kata, so it's not meant to be a straightforward task.
And watch out with your "demented" language when commenting. This isn't a COD lobby, you know?
exactly, this is a puzzle, and a crucial part of it is hiding expected results
This comment has been reported as abusive
As in "it smells really funky"?
After realizing the assignment makes no sense as given, I had not zero but "negative infinity" motivation to try to divine what the clown who formulated it meant.
Unless completelly rewritten, it should be given as a prime example of how not to write a Kata.
The words before some absurd graph (as in mapping input to output) should actually make sense. It would be better to word it "given such sequence of input/output mappings, divine an algorithm that will pass some BS tests".
Absolutely demented "Kata", the assignment is extremely unclear, the labeling "patients/chairs" on the table is worse than wrong, suggested numbers certainly don't correspond to the insinuated "as far from others as possible, break ties by rounding down".
Extreme re-wording or nuking this brain-fart are the only options.
It works now
It's just a math logic :)
anyway Thx for reply me hahah
It's unfortunate that the author's intention wasn't fully realized. They were clearly seeking some degree of optimization. However, the issue lies in the fact that ranking inflation was already a widespread practice at that time.
I think that I personally would prefer softening the tests to standards of 7 kyu kata. I think it is reasonable to accept O(n) solutions for this particular kata, as there is many yellows which require performant factorization.
I checked your code and it is, unfortunately, too slow. It works well for small numbers, but works very, very sloooowly for larger numbers.
It's a bit of a bad luck, because usually, white kata are meant to have no special performance requirements and should accept also some kinds of non-performant solutions. Unfortunately, this challenge does not follow this pattern. It can be considered more difficult than other 7 kyu kata, especially for newbies.
My Code Correct but Timed Out
Doesn't work correctly HOW?
Loading more items...