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.
approved by someone
And why would that be so hard to just add the 3 tests currently in
fixed_test_cases
to the sample tests?I'll never understand your opinion on this.
Blind and I very much disagree, and this issue seems to me to come down to a design decision.
If having limited example tests was lack of knowledge just which edge cases to include tests for, instead of a design decision, by all means add more. The reaction here seems to indicate willingness to do so.
I maintain having limited example tests would be a valid design decision, but it would have to be made explicitly.
that's definitely no excuse. the current setup is just exactly equivalent to no tests at all. And no tests at all is an issue.
:]
I disagree. This is a 5 kyu kata; solvers can write their own tests if they want more. If this were a white, I'd agree. ( Discord may be a better place to have this discussion. )
I can't tell why, but as i read you, i finally got it! Now i know i can do it, thanks a lot!
Hi,
Not enough example tests. The current ones are mostly useless because anything "slightly" wrong can pass them. At the very least the fixed tests should be added.
Cheers
PHP
translationI thought "ant" was a metaphor for "steel ball in Newton's cradle". Never heard a steel ball complaining about a concussion.
I think "ant" in this kata is a metaphor for "human", so hitting our heads, time and time again, seems to be quite accurate.
I'd be more worried about that with a term that includes the word "traumatic". Or maybe our local Animal Party ( yes, we have one, no, it's not PETA, this is an actual political party ) might be triggered by ant abuse, and ultimately we just can't
make jokessay anything any more.As if ants weren't smart enough to turn around before they hit their head on another ant, given two meters of separation. I don't even know if ants can see two meters.
outdated suggestion
Watch out with the term
concussions
. It might be some medical term that could trigger some admin here ;) Btw, CTE is a Common Table Expression where I come from.Don't even try to simulate everything that happens. That's nice to see patterns and validate your solution against smaller inputs ( because it means you can generate tests yourself ), but it's never going to work for bigger inputs.
There's a reason this kata has a
performance
tag and a specified upper bound.O(n²)
won't cut it; you'll needO(n)
or very close to it.If it makes you feel better, my first solutions ( yes, plural ) turned out not to be able to handle a million ants either ( though I could handle a hundred thousand; I skipped simulating entirely ).
Loading more items...