Ad
  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    "The aliens that survive are the alien at wave[7] with an ending health of 2
    and the alien at wave[8] with an ending health of 8." - typo in Instructions (Test Example section). Wave[8]'s health can't be 8 since it's 0 from the start. And the same is applicable to "example_solutions = [[10,[7,2],[8,8]]..." in Sample Tests section. As for wave[7] then it's also not valid. According to my solution it has to be wave[9] and wave[10] respectively. On the other hand it still accepted because their sum is 10.

  • Custom User Avatar

    Yes, errors for crashing still happen after complications in code.

  • Custom User Avatar

    No matter how hard I try attempting, the thing would just crash and say session expired.

  • Custom User Avatar
  • Custom User Avatar

    What regex can consistently get countries from string like these:

    "Citizens of Impor, Arstotzka require passport"
    "Citizens of Kolechia require passport"
    "Deny citizens of Arstotzka, United Federation"
    

    I solved it without regex (check solution because spoiler)

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    Perhaps my description of the kata will make more sense:

    Description
    Amidakuji is a lottery method designed to create random pairs between two sets of the same size.In this kata the elements of the first set are whole numbers from 0 to 6. Your task is to write an amidakuji function that returns second set comprised of converse numbers.

    Input
    Your function will receive an array of equal-length strings consisting of 0 and 1 characters; this represents the "ladder" structure. The 1 represent the rungs of the ladder and the 0 represent empty space.

    const ladder = [
        '001001',
        '010000',
        '100100',
        '001000',
        '100101',
        '010010',
        '101001',
        '010100'
    ];
    
    amidakuji(ladder); // [4, 2, 0, 5, 3, 6, 1]
    

    Take a look at the diagram below:

    Row 0 of the ladder is '001001' string, which means there will be two horizontal bridges at this row; one between the vertical lines 2 and 3 and another between vertical lines 5 and 6. When proceed to move down vertical lines, a transition is made to the adjacent vertical line over the nearest bridge.

    Output
    The diagram above is a visual representation of ladder argument of the function.
    At the top of the diagram the 2 has a third position, in the aftermath of the ladder it got a second position. The yellow highlighted path shows the path taken by the 2 value. Every time it encounters a bridge, it moves to the opposite vertical line.

    Your function should return an array of numbers, with each number in its final position.

  • Custom User Avatar

    When I was trying to submit a python solution, it passed all the fixed tests, but when it got to random I got an error

    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 139, in <module>
        for i in range(20): test_fnc(*test_gen(RN(5)+20,RN(6)+7,2))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/workspace/default/tests.py", line 136, in test_fnc
        test.assert_equals(blast_sequence(nx,ny),ref_funk(nx,ny))
                                                 ^^^^^^^^^^^^^^^
      File "/workspace/default/tests.py", line 53, in ref_funk
        mv = zv + y
             ~~~^~~
    TypeError: can only concatenate list (not "int") to list
    

    My solution seems to work with the random test cases, but somehow it still gives the error

  • Custom User Avatar
  • Custom User Avatar

    Unless I've gone blind, there's almost nothing explained about the Allow/Deny a nation. Do I have to check in a whitelist manner (nation has to be in allow list) or blacklist manner (nation must not be in deny list) or do I combine them to one list in either manner, where one method removes from list, other adds to it? Additionally, do the countries aggregate or get reset between days?

  • Custom User Avatar

    i'm coding in the golang version and i'm sure there's something wrong with one of the tests

    given that the lower bound is 100000 and the upper bound is 12345678900000000, but somehow the answer is only 718650, which from what I calculated is way less then just the total for a 16 upside-down number sum. So, now im also wondering if actual tests are correct or not.

  • Custom User Avatar

    That was a really nice kata

    One small suggestion; the description states:

    A player who completes the fourth side of a 1 x 1 box earns one point and takes another turn

    It left me wondering whether completing two boxes at once provided with 2 extra turns or only 1. It turns out it is the latter. Perhaps this could be mentionned ?

  • Loading more items...