https://www.nowcoder.com/exam/oj?tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=295 BM38. 在二叉树中找到两个节点的最近公共祖先 https://www.nowcoder.com/practice/e0cc33a83afe4530bcec46eba3325116?tpId=295&sfm=github&channel=nowcoder 根据题目直接上模板就可以了 public int lowestCommonAncestor (TreeNode root, int p, int q) { ...