auto commit

This commit is contained in:
CyC2018 2018-03-27 11:52:58 +08:00
parent 33ec363ae5
commit 55262b9ffa

View File

@ -2590,7 +2590,7 @@ public int StrToInt(String str) {
/ \ / \
___2__ ___8__ ___2__ ___8__
/ \ / \ / \ / \
0 _4 7 9 0 4 7 9
/ \ / \
3 5 3 5
For example, the lowest common ancestor (LCA) of nodes 2 and 8 is 6. Another example is LCA of nodes 2 and 4 is 2, since a node can be a descendant of itself according to the LCA definition. For example, the lowest common ancestor (LCA) of nodes 2 and 8 is 6. Another example is LCA of nodes 2 and 4 is 2, since a node can be a descendant of itself according to the LCA definition.
@ -2611,7 +2611,7 @@ public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
/ \ / \
___5__ ___1__ ___5__ ___1__
/ \ / \ / \ / \
6 _2 0 8 6 2 0 8
/ \ / \
7 4 7 4
For example, the lowest common ancestor (LCA) of nodes 5 and 1 is 3. Another example is LCA of nodes 5 and 4 is 5, since a node can be a descendant of itself according to the LCA definition. For example, the lowest common ancestor (LCA) of nodes 5 and 1 is 3. Another example is LCA of nodes 5 and 4 is 5, since a node can be a descendant of itself according to the LCA definition.