Sunday, May 22, 2016

Leetcode 236: Lowest Common Ancestor - practice (III)

May 22, 2016


  Leetcode 236: Lowest common ancestor 

  Based on the blog:


Julia practices using C#:
user recursive function, use preorder traversal to do search: 

https://gist.github.com/jianminchen/3a9931ecb7818498cbbb47152ed66d89

Reference:

1. Use post order traversal to find the lowest common ancestor in binary tree:
http://juliachencoding.blogspot.ca/2016/05/leetcode-236-lowest-common-ancestor_21.html


No comments:

Post a Comment