PAT甲级1151 LCA in a Binary Tree LCA+DFS_pat1151测试点2-CSDN博客文章浏览阅读2.5k次。LCA问题在常规树中的实现,思路和1143一样,本体主要要解决的就是递归子树边界的问题我采用的map映射的方法,将中序遍历的结点值映射为下标位置,那么如果用下标来代替结点值的话,当前的树便是一颗b...... admin2024-01-25