Skip to content

Commit b6d18b8

Browse files
clean up 236
1 parent b7da55c commit b6d18b8

File tree

1 file changed

+0
-8
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-8
lines changed

src/main/java/com/fishercoder/solutions/_236.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ For example, the lowest common ancestor (LCA) of nodes 5 and 1 is 3.
2424
public class _236 {
2525
public static class Solution1 {
2626

27-
/**
28-
* We need to find TWO nodes in the tree,
29-
* so we'll have to divide and conquer this tree,
30-
* we need to have two nodes to as the intermediate result,
31-
* also, refer to my earlier drawings:http://www.fishercoder.com/2016/06/23/lowest-common-ancestor-of-a-binary-tree/
32-
* I'm really impressed with myself at that time!
33-
*/
34-
3527
public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
3628
if (root == null || root == p || root == q) {
3729
return root;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy