Ad
  • Custom User Avatar
  • Custom User Avatar

    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!

  • Custom User Avatar
  • Custom User Avatar
  • Default User Avatar

    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).

  • Default User Avatar

    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.

  • Default User Avatar

    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

  • Custom User Avatar

    My original code passes the attempt tests repeatedly in less than 2 seconds.

  • Default User Avatar

    did anyone complete this recently ? the only way for me to pass is to reduce the limit from 150 to about 110. 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 about 14 or 15 passes the tests 99% of the time, so it is not actually enforced

  • Default User Avatar

    The 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!

  • Custom User Avatar

    .

  • Custom User Avatar

    Revised fork: https://www.codewars.com/kumite/5d95a3e7ab4aad0022dbf303?sel=5da2c7e12aec73af332917e9

    Changes:

    • made function variadic so it takes any number of arguments; this way the translation is more identical to the original
    • corrected name of function
    • updated test suite with Python test framework V2
    • added random test generator that will run 100 random tests
    • reversed changes to the Description
  • Custom User Avatar

    I wrote a fork here: https://www.codewars.com/kumite/5d95a3e7ab4aad0022dbf303?sel=5da2c7e12aec73af332917e9

    Changes:

    • made function variadic so it takes any number of arguments; this way the translation is more identical to the original
    • fixed name: should be flatten instead of deep_flatten
    • updated test suite with Python test framework V2
    • added random test generator that will run 100 random tests
    • reversed changes to the Description
  • Custom User Avatar

    This 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.

  • Custom User Avatar

    @smartspot2, yeah a Python translation of that kata would make more sense.

  • Loading more items...