2013年4月8日
摘要: 采用中序遍历,将左子树中根节点的前驱节点和右子树中根节点的后继节点与根节点连接。 1 #include <iostream> 2 3 using namespace std; 4 5 template<class T> 6 struct tree_node 7 { 8 T data; 9 tree_node * left_child; 10 tree_node * right_child; 11 }; 12 13 /************************************************* 14 Function: ... 阅读全文
posted @ 2013-04-08 15:21 blue firmament 阅读(198) 评论(0) 推荐(0) 编辑