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.
python new test frameworks
Wow, 2 years ago, sorry! I think the same as you (Felixg2468, and also a bit with angello's premise), especially after doing my own kata and explicitly stating that I'm a newbie, asking people to kindly point out my mistakes because we've all been beginners at some point. Despite that, some people responded or reported issues in a very disrespectful manner because proclaimed themselves some kind of know-all (and far from say sorry, them are saying I could admit I am newbie when it's the thing I more repeated in everywhere in the commentaries and documentation, lmao).
On the other hand though, as I mentioned, I consider myself a newbie, but I’ve spent a lot of time thinking and searching for solutions to this kata, and I can honestly say that I’m proud of my work. To move beyond our "newbie selves," you have to put in the effort and explore different approaches to solving problems. My first solutions were lengthy and complex, but now I aim for efficiency, better readability, and even try to achieve one-liners where possible. What I’m saying is that no one should expect to improve their skills by always sticking to the same approach or taking the easy way out, right? Hope you understand what I meant, let's be empathic teaching and helping one to others with proactivity and but from the respect!
genius
wtf so there is a pattern?!
Not your algo, the description says '150 in a row' but akar-0 - and everyone else using 150 - is testing for 150 total (non-consecutive).
(100 consecutive - or 150 overall - passes all the tests).
you realize not all beginners have as much knowledge as you, so technically this is good for a beginner, get out of 7ku difficulty, this is easy mode.
okay then, i guess i did not find the correct algo. but it's still an issue that the tests let me get away with a limit 10 times lower than what is stated
My original code passes the attempt tests repeatedly in less than 2 seconds.
did anyone complete this recently ? the only way for me to pass is to reduce the limit from
150
to about110
. i dont think my algo can be optimized much, i reduced data conversions and loops to a minimum.Besides, the
150
limit seems to be problematic in itself: reducing it to about14
or15
passes the tests 99% of the time, so it is not actually enforcedThe end of the description of this kata says try not to use the if function, so this solution should not be voted for best practices!
.
Revised fork: https://www.codewars.com/kumite/5d95a3e7ab4aad0022dbf303?sel=5da2c7e12aec73af332917e9
Changes:
100
random testsI wrote a fork here: https://www.codewars.com/kumite/5d95a3e7ab4aad0022dbf303?sel=5da2c7e12aec73af332917e9
Changes:
flatten
instead ofdeep_flatten
100
random testsThis can be made more identical to the original kata by making
deep_flatten
a variadic function. This works for Python because JS has an equivalent operator for putting a variable number of arguments into a list.@smartspot2, yeah a Python translation of that kata would make more sense.
Loading more items...