Organizing Containers of Balls

  • + 0 comments

    Python usng @mikesboyle solution:

        in_n = [sum(i) for i in container]
        ball_n = list(map(sum, zip(*container)))
        return "Possible" if sorted(in_n) == sorted(ball_n) else "Impossible"