Ad
  • Default User Avatar

    I don't understand this Kata for Python 3.6.

    So I'm supposed to take a single list and split it into two, right?

    So why are there three inputs: source, front, back?

    I thought the first thing I'd do is print all three inputs to try and figure this out, or at least just understand what form this list is arriving... but all I get back is a reference to the Node object which I don't feel has been properly explained.

    Anyone able to clear up what these instructions want me to do for a Python 3.6 implementation?

  • Default User Avatar

    This was the issue.

    I was dropping values from the list if they didn't have a pair and mutating the original list. Quite difficult to debug!

    Copying the list solved this issue. I can see the argument for not passing a copy, equally, I wasn't aware the same list was going to be reused in mutliple tests. Maybe some test to check the list hasn't been mutated?

  • Default User Avatar

    Ah, I was reading the wrong log.

    Still have the same issue...

    num ints:9999998, s:16
    Counter({1: 9999994, 6: 1, 7: 1, 8: 1, -3: 1})

    I still don't see a valid pair there that sums to 16.

    I'm using Python 3.6.

  • Default User Avatar

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

  • Default User Avatar

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