背景 最近遇到一个二叉树的问题。 给定一个家族的族谱 输入2个家庭成员 要求输出2人的辈分差距 树的结构 typedef struct node { char name[100]; int sum;//表示辈分根节点为1其子树为2 struct node* l; struct node* r; }Benode, * Betree; 遍历求辈分差 int resum(Betree& p, char