Ad
  • Default User Avatar

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

  • Default User Avatar

    You should have the factors in the first array, and the number of each in the second
    So one 2 and one 5 are written as an array containin the 2 and 5, and a second array containing the number of them; one of each
    so it's [[2,5],[1,1]]

  • Custom User Avatar

    Make sure when doing your decode that your key is using the "decoded" text and not the encoded text, meaning you can't pre-compute the key on decode.

    From the description:
    With the basic Vigenère Cipher, we assume the key is repeated for the length of the text, character by character. In this kata, the key is only used once, and then replaced by the decoded text

  • Default User Avatar

    For some reason the random tests require the anser to be -1. As you can see, I was forced to either wait for the bug to be fixed, forfeit this kata or cheat the bug.

  • Default User Avatar

    Same here:
    Wrong result for recipe
    {'butter': 73, 'crumbles': 54, 'chocolate': 91}
    and available ingredients
    {'butter': 9326, 'crumbles': 3929, 'chocolate': 1394} #unrequired ingredients removed te declutter
    : 15 should equal -1

  • Default User Avatar

    Clever! How you use binary mapping of the three cells to make a single condition check.

  • Default User Avatar

    You could have used a defaultdict instead of the getPriority function.

  • Default User Avatar

    That test case is right. It's actually there to make it easier to conceptualize how the polyalphabetic shifts work in this particular Vigenere variant.

  • Default User Avatar

    I said it should NOT result in PASSWORDPASSWORDPASSWORD. This is one of the default test cases, but I can't see how that testcase could be right.

  • Default User Avatar

    AAAAAAAAPASSWORDAAAAAAAA with the key "PASSWORD" and a standard uppercase latin alphabet should indeed result in an encoded string of PASSWORDPASSWORDPASSWORD, so it seems like you're misunderstanding the definition. Also, the test cases don't refer to any variable called key, so I'm guessing that's on your end.

  • Default User Avatar

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

  • Default User Avatar

    A missing first or last element is not a sequence with a single element missing.
    [2,3,4,5,6] is a correct sequence, it is not correct to state it should be [1,2,3,4,5,6] or [2,3,4,5,6,7]