随笔分类 -  数据结构

摘要:求某结点的所有子孙:先序遍历中,子孙在该结点后面;后序遍历中,子孙在该结点前面。 即先序遍历到该结点时,开始计数;后序遍历到该结点时,停止计数。 String Switch="Off"; int i=0; public int count1(Node root,int x){ if (root==n 阅读全文
posted @ 2021-11-01 18:00 utigoose 阅读(61) 评论(0) 推荐(0)