Ad
  • Custom User Avatar

    I think it might have been clearer if the description showed how an IP can have 3 failures "in a row", with other IPs in between. Perhaps changing the example input to

    logs = [
        "192.168.1.1 LOGIN_FAIL user=admin",
        "192.168.1.1 LOGIN_FAIL user=admin",
        "10.0.0.5 LOGIN_FAIL user=test",
        "10.0.0.5 LOGIN_SUCCESS user=test"
        "192.168.1.1 LOGIN_FAIL user=root",
    
    ]
    

    I initially understood the problem to mean literally in a row, but then I thought that didn't make sense for the narrative framing.

  • Custom User Avatar
  • Custom User Avatar

    ^ (caret) ... allows changes that don't modify the left-most non-zero digit

    The left-most non-zero digit is the 3, so you arent allowed to change it to match the 4.

    Also, please don't use the Issue tag for questions. Please use the Question tag for questions

  • Custom User Avatar

    Why test.assert_equals(satisfies("0.0.4", "^0.0.3"), False) ?

  • Custom User Avatar

    The outPut Should be alphabetically sorted ☠️

  • Custom User Avatar

    From the description:

    Return a list of suspicious IPs, sorted alphabetically.

  • Custom User Avatar

    In Python, the sample tests (and presumably the actual tests) require that the output be sorted. However, this is not mentioned in the description.

    I would suggest adjusting the description to specify the output must be sorted.

  • Custom User Avatar

    Approved by someone

  • Custom User Avatar

    Fixed in this JS fork, if anyone wants to review/approve.

  • Custom User Avatar

    The reason you have such confusing looking logs is because you are mutating the input. The real issue is that the random tests on JS are vulnerable to input mutation (see this solution).

  • Custom User Avatar

    (The user attempted JavaScript)

  • Custom User Avatar

    It seems to think that if the IP is the same but the user is different it shouldn't flag the IP. Is that intentional? This data expected an empty array [
    '19.249.169.21 LOGIN_SUCCESS user=guest',
    '19.249.169.21 LOGIN_FAIL user=guest',
    '19.249.169.21 LOGIN_FAIL user=user',
    '19.249.169.21 LOGIN_FAIL user=guest',
    '19.249.169.21 LOGIN_SUCCESS user=root',
    '19.249.169.21 LOGIN_FAIL user=test',
    '19.249.169.21 LOGIN_FAIL user=user',
    '19.249.169.21 LOGIN_SUCCESS user=root',
    '19.249.169.21 LOGIN_FAIL user=user',
    '234.167.45.63 LOGIN_SUCCESS user=root',
    '234.167.45.63 LOGIN_FAIL user=admin',
    '234.167.45.63 LOGIN_SUCCESS user=user',
    '234.167.45.63 LOGIN_SUCCESS user=root',
    '234.167.45.63 LOGIN_FAIL user=user',
    '234.167.45.63 LOGIN_FAIL user=user',
    '234.167.45.63 LOGIN_FAIL user=test',
    '234.167.45.63 LOGIN_FAIL user=user',
    '234.167.45.63 LOGIN_FAIL user=user',
    '40.188.220.64 LOGIN_FAIL user=root',
    '40.188.220.64 LOGIN_FAIL user=guest',
    '40.188.220.64 LOGIN_FAIL user=test',
    '40.188.220.64 LOGIN_FAIL user=test',
    '94.58.159.194 LOGIN_FAIL user=guest',
    '94.58.159.194 LOGIN_SUCCESS user=user',
    '94.58.159.194 LOGIN_FAIL user=root',
    '94.58.159.194 LOGIN_FAIL user=test',
    '94.58.159.194 LOGIN_SUCCESS user=user'
    ]

  • Custom User Avatar

    good kata!
    Looked easy, turned out to be tricky... (for me)

  • Custom User Avatar

    Great kata, easy to learn with.

  • Custom User Avatar

    Omg and I'm not even supposed to be the bot, you guys can't be serious...

  • Loading more items...