## Populating Next Right Pointers in Each Node

Given a binary tree

Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to `NULL`.

Initially, all next pointers are set to `NULL`.

Note:

• You may only use constant extra space.
• You may assume that it is a perfect binary tree (ie, all leaves are at the same level, and every parent has two children).

For example,
Given the following perfect binary tree,

```         1
/  \
2    3
/ \  / \
4  5  6  7
```

After calling your function, the tree should look like:

```         1 -> NULL
/  \
2 -> 3 -> NULL
/ \  / \
4->5->6->7 -> NULL
```

## Find Bottom Left Tree Value

Given a binary tree, find the leftmost value in the last row of the tree.

Example 1:

```Input:

2
/ \
1   3

Output:
1
```

Example 2:

```Input:

1
/ \
2   3
/   / \
4   5   6
/
7

Output:
7
```

Note: You may assume the tree (i.e., the given root node) is not NULL.

## Find Largest Value in Each Tree Row

You need to find the largest value in each row of a binary tree.

Example:

```Input:

1
/ \
3   2
/ \   \
5   3   9

Output: [1, 3, 9]

```

## Invert Binary Tree

Invert a binary tree.

```Ex:
4
/   \
2     7
/ \   / \
1   3 6   9```

to

```     4
/   \
7     2
/ \   / \
9   6 3   1```

## Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).

For example:
Given binary tree `[3,9,20,null,null,15,7]`,

```    3
/ \
9  20
/  \
15   7
```

return its bottom-up level order traversal as:

```[
[15,7],
[9,20],
[3]
]
```

## Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

For example, this binary tree `[1,2,2,3,4,4,3]` is symmetric:

```    1
/ \
2   2
/ \ / \
3  4 4  3
```

But the following `[1,2,2,null,3,null,3]` is not:

```    1
/ \
2   2
\   \
3    3
```

Note:
Bonus points if you could solve it both recursively and iteratively.

## Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).

For example:
Given binary tree `[3,9,20,null,null,15,7]`,

```    3
/ \
9  20
/  \
15   7
```

return its zigzag level order traversal as:

```[
[3],
[20,9],
[15,7]
]
```

## Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).

For example:
Given binary tree `[3,9,20,null,null,15,7]`,

```    3
/ \
9  20
/  \
15   7
```

return its level order traversal as:

```[
[3],
[9,20],
[15,7]
]
```