## Description

Given a binary tree, return all root-to-leaf paths.

**Note**: A leaf is a node with no children.

**Example**:

1 | Input: |

多读书 多思考 少吃零食 多睡觉

Given a binary tree, return all root-to-leaf paths.

**Note**: A leaf is a node with no children.

**Example**:

1 | Input: |

Given a binary tree, find the subtree with minimum sum. Return the root of the subtree.

**Example**

**Example 1**:

1 | Input: |

Output:1

**Example 2**:

1 | Input: |

Output:1

Given a binary tree, find the subtree with maximum average. Return the root of the subtree.

**Example**

Given a binary tree:

1 | 1 |

return the node `11`

.

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 | 1 |

But the following `[1,2,2,null,3,null,3]`

is not:

1 | 1 |

**Note**:

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

Given a binary tree, determine if it is a valid binary search tree (BST).

Assume a BST is defined as follows:

- The left subtree of a node contains only nodes with keys
**less than**the node’s key. - The right subtree of a node contains only nodes with keys
**greater than**the node’s key. - Both the left and right subtrees must also be binary search trees.

Example 1:

1 | Input: |

Example 2:

1 | 5 |

Invert a binary tree.

Input:

1 | 4 |

**Trivia**:

This problem was inspired by this original tweet by Max Howell:

Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so f

*off.

Given a knight in a chessboard (a binary matrix with **0 as empty** and **1 as barrier**) with a **source** position, find the **shortest** path to a **destination** position, return the length of the route.

Return `-1`

if destination cannot be reached.

**Notice**

source and destination must be empty.

Knight can not enter the barrier.

**Clarification**

If the knight is at `(x, y)`

, he can get to the following positions in one step:

1 | (x + 1, y + 2) |

**Example**

1 | [[0,0,0], |

source = `[2, 0]`

destination = `[2, 2]`

return `2`

1 | [[0,1,0], |

source = `[2, 0]`

destination = `[2, 2]`

return `6`

1 | [[0,1,0], |

source = `[2, 0]`

destination = `[2, 2]`

return `-1`

Git first time set up

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

generate/add ssh key

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linux

Testing your SSH connection

https://help.github.com/articles/testing-your-ssh-connection/

remote push from existing folder

http://kbroman.org/github_tutorial/pages/init.html

add ssh key to ssh-agent

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#adding-your-ssh-key-to-the-ssh-agent

Common Unit conversion
10^6 byte -> 1MB
10^9 byte -> 1GB
10^12 byte -> 1TB