Ad
  • Custom User Avatar

    It's not. This code is an old (wrong) one. It worked at that time because the different files involved in a python kata where "brutally" merged together before execution, so preloaded, solution and tests parts where actually in the same global scope. And since the inputs are all defined at the root of file of the tests, using the same name than the argument of the function, that worked while being effectiveley totally wrong (You can check in the fork panel, it throws a NameError).

  • Default User Avatar

    Hmm, I don't understand how inp can be in scope in the definition of ret.

  • Default User Avatar

    Please adjust the Python test cases to include false positives that span 2 consecutive words in array2 to prevent solutions that involve "".join(array2)

  • Default User Avatar

    This is not correct. It will give false positives, for example if array1 = ["abc"] and array2 = ["cab", "cat"], r will be ["abc"] but should be []. Nice approach otherwise.

  • Default User Avatar