摘要: 深度优先搜索 class Solution { public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) { /** * 如果找到了p或者q,就返回 */ if (root == null || root 阅读全文
posted @ 2021-12-27 10:26 振袖秋枫问红叶 阅读(33) 评论(0) 推荐(0)