Ad
  • Custom User Avatar

    Test case added - some solutions were invalidated.

  • Custom User Avatar

    Actually, that was not intended. I just forgot to strip the zeros. Now fixed

  • Custom User Avatar

    Yeah, that's a mistake, changed it to 'decimal number'

  • Custom User Avatar

    done

  • Custom User Avatar

    Yeah, I know that the pattern seems quite complicated to crack, but I already found some regularities, also, I really want mine brainfuck katas to actually be challenging, so if you can simply make all of them with just a transpiler, that's not really great... That's in fact the main reason I did that, to really avoid transpiler succeeding instantly.

  • Custom User Avatar

    Actually I set up the performance requirements high enough so my code passes in ~10s, I did this to encourage making handwritted programs at first and to really search a way of applying the algorithm smartly. Moreover, I'm actually doing some researches on the period of the cycle depending on the length of the string, that could optimize the code WAAAAY more as you could simply take the modulo of n, so this is also to encourage doing this kind of researches that I did that, as I'm pretty sure that even my solution is really bad in fact.

  • Custom User Avatar
  • Custom User Avatar

    Lol, yes I write my codes by hand, it wouldn't be as fun otherwise!
    Great solution btw, it is really faster than mine!

  • Custom User Avatar

    Yes! Thank you, I wrote the initial code quite rapidly and completly forgot that the last char of the first input would be null so it would not enter the second loop lol
    That seems like a huge mistake for someone coding in BF 😅

  • Custom User Avatar

    Yes, I noticed it after publishing mine, but it is slightly different as the shift argument is only given at the end in my version, which changes quite a lot of things in Brainfuck, making it a little bit harder, and I've started to make a collection of katas in this style, the second one that I've done uses this one a lot, so it would be annoying if it was removed...
    And when I say that it uses that one, it also has the key argument at the end, so it is only a more advanced version of my kata, and it takes a really different path than this other kata from Just4FunCoder, so that would be way harder to jump from his one to mine, as it would require remaking almost everything...
    That's why I keep mine, hoping that it will get out of beta before his version lol...

  • Custom User Avatar
  • Custom User Avatar

    I'm having trouble comparing two arrays:
    tested for [ 55, 53, 52, 55 ]: expected [ 66, 160 ] to equal [ 66, 160 ]
    Is it a js thing or something? I'm using assert.equal right now in both sample and normal testcases and I'm confused. Maybe you could do that?

  • Custom User Avatar

    retired, destroyed, abandoned

  • Custom User Avatar

    I added the restriction that both players must independently and randomly select a suitcase each round. Additionally, we now use our own custom random generator for all random selections, and I've limited the randomization to this model specifically—avoiding other sources like np.random, etc., to ensure consistency.

  • Custom User Avatar

    It was not an actual JS translation, if I'm correct. Codewars used to not have BF as a language, so they made a workaround by doing it on JS. Once CW added BF, BF added as a translation to those katas.

  • Loading more items...