Interesting, this seems to have inverted it! Is it as simple as swapping when there's more than one node?

What if we had more than two nodes to swap per level though? If there was an additional level, it might look like this:

SNIPPET
1      1
2     / \
3    3   2
4   / \   \
5  4   5   3