二叉树转双向链表
摘要:
1 void ConvertToList(TreeNode*& root) { 2 TreeNode* left; 3 TreeNode* right; 4 if (root) { 5 left = root->left_; 6 right = root->right_; 7 TreeNode* left_most_right = left; 8 while (left_most_right && left_most_right->right_) { 9 left_most_right = left_mo... 阅读全文
posted @ 2013-10-28 23:44 samules 阅读(208) 评论(0) 推荐(0) 编辑