摘要: Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo 阅读全文
posted @ 2018-03-16 16:20 __Meng 阅读(123) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2018-03-16 14:47 __Meng 阅读(143) 评论(0) 推荐(0)
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2018-03-16 14:33 __Meng 阅读(167) 评论(0) 推荐(0)