xqian / cpp_projects

cplusplus projects for myself
2 stars 2 forks source link

Lowest Common Ancestor of a Binary Tree Part #15

Closed xqian closed 11 years ago

xqian commented 11 years ago

http://leetcode.com/2011/07/lowest-common-ancestor-of-a-binary-tree-part-i.html http://leetcode.com/2011/07/lowest-common-ancestor-of-a-binary-tree-part-ii.html

I think my solution may not be as clean as the on eon leetcode, but I think my solution can handle the no ancestor case.