# Invert Binary Tree

Invert a binary tree so that the left and right children of each node swap.

Example

```
1 1
/ \ / \
2 3 => 3 2
/ \
4 4
```

The following is a recursive algorithm:

Invert a binary tree so that the left and right children of each node swap.

Example

```
1 1
/ \ / \
2 3 => 3 2
/ \
4 4
```

The following is a recursive algorithm: