Ad
  • Default User Avatar

    Great follow up kata of the Insane version. First i thought, i had to find a new better approach, but my recursive approach from Insane Colored Trinagles was good enough, it just needed some gradual optimizations. Final testing time of my Python solution was 10109 ms. Thanks for this kata, I learned even more!

  • Custom User Avatar

    6th example: RBRGBRBGGRRRBGBBBGG

    If going by your logic of start + end = result: R + G => B

    But if we iterate manually:

    R B R G B R B G G R R R B G B B B G G
     G G B R G G R G B R R G R R B B R G
      G R G B G B B R G R B B R G B G B
       B B R R R B G B B G B G B R R R
        B G R R G R R B R R R R G R R
         R B R B B R G G R R R B B R
          G G G B G B G B R R G B G
           G G R R R R R G R B R R
            G B R R R R B B G G R
             R G R R R G B R G B
              B B R R B R G B R
               B G R G G B R G
                R B B G R G B
                 G B R B B R
                  R G G B G
                   B G R R
                    R B R
                     G G
                      G
    

    So... no. It's not B. It's G. The notation of start + end = result is not always correct.

    Not a kata issue. Resolved.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Finally, I did it. Python. My time is at the eadge. 11300 ms.
    I think that for Python some tests should be excluded.

  • Custom User Avatar
  • Custom User Avatar

    I just tested some solutions, and they pass consistently below 10 seconds.

  • Custom User Avatar

    Something does not work with Python, as reported by other users. Even just writing "return 'R'" in the function body, it takes 6-12 seconds to pass/fail all the tests; sometimes it even times out. Some administrator should consider removing the Python version entirely.

  • Custom User Avatar

    The variation in inputs (for Python) causes this Kata to randomly pass or fail solutions due to timeout.
    Please fix such that the inputs are representative and can be finished in the time budget.

  • Custom User Avatar

    100 million characters in 21 seconds is way too slow. The tests test 4/5 strings with 100 million characters and 1 string with 1 billion characters and it has to pass is 12 seconds. That is your solution should pass them in ~6 seconds max because the tests also need to create the huge strings and run the reference solution themselves, which takes a little bit less than half of the 12 seconds.

  • Custom User Avatar

    This kata cannot be updated to Node v14 because of the reduced max string length limit which was reverted from 1GB to 256 MB in V8 version 8.2.6: https://github.com/v8/v8/commit/ea56bf5513d0cbd2a35a9035c5c2996272b8b728
    Node v14 uses V8 8.4, before since Node v9 (V8: 6.2.100) the 1GB limit was in place.

  • Custom User Avatar
  • Custom User Avatar

    Python 3.8 should be enabled.

  • Default User Avatar

    I'm marking my "suggestion" as "resolved", since the translation has now been "Approved" :)
    (Sorry I'm obliged to "post a comment" in order to do it)

    Thanks again to @Blind4Basics! ^^

  • Default User Avatar

    "Update": here is the "Fork" I made, taking into consideration @Blind4Basics's remarks! [Thanks again! :)]
    https://www.codewars.com/kumite/61575a190f76ac0021c0e336?sel=615b9c547c1df80027994ac6

    This "new version" includes several changes in order to prevent potential "cheating"...

    I also(re-)tested the 5 "Highest Rated" Ruby solutions from "Insane Coloured Triangles": all 5 of them always fail [Time Out] very early: either at my "quick little check", or at the "easiest long strings" ("Ultra-Violence": Only 10 million characters) without even reaching the next steps... ;)
    [Meanwhile, so far, the "Reference Solution" always passes all tests within 5 to 10 sec]

  • Default User Avatar

    Here is my "Translation (attempt)" to Ruby.
    https://www.codewars.com/kumite/61575a190f76ac0021c0e336?sel=61575a190f76ac0021c0e336
    It seems to work fine, although I had to use a "little trick" to "generate the Huge Random strings faster" ==> I hope it's not too much of an issue :/

    Note: the solution I coded always passed the tests taking between 5 and 10s, while I also made a test with the 3 "best rated" (Ruby) solutions from "Insane Coloured Triangles" ==> All 3 of them timed out ;)
    ...So I guess the "tests' level" seems quite appropriate...^^

  • Loading more items...