摘要: 问题: 给出一颗二叉树,两个节点p和q,求出这两节点的最近公共父节点(LCA)。 Example 1: Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1 Output: 3 Explanation: The LCA of nodes 阅读全文
posted @ 2020-09-28 16:19 habibah_chang 阅读(121) 评论(0) 推荐(0) 编辑