摘要: 来源:陈越《数据结构》03-树2 List Leaves (25分)Given a tree, you are supposed to list all the leaves in the order of top down, and left t... 阅读全文
posted @ 2017-04-09 20:39 jacksin 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 来源:大学mooc后的编程题(陈越《数据结构》)03-树1 树的同构 (25分)给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左... 阅读全文
posted @ 2017-04-09 14:30 jacksin 阅读(2008) 评论(0) 推荐(0) 编辑