摘要: 问题:求一个二叉树,x节点到y节点的距离 算法:找到xy最近的父节点,res=cent[x]+cent[y]-2*cent[lcm(x,y)] class Node{ int l; int r; int cent; int father; } static int lcm(int u,int v) 阅读全文
posted @ 2021-03-07 21:18 金龙喩 阅读(84) 评论(0) 推荐(0)