摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2018-02-05 21:35 乐乐章 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2018-02-05 21:15 乐乐章 阅读(127) 评论(0) 推荐(0) 编辑