摘要: 题目:输入一颗二元查找树,将该树转换为它的镜像,即在转换后的二元查找树中,左子树的结点都大于右子树的结点。用递归和循环两种方法完成树的镜像转换。例如输入:8/\610/\/\57911输出:8/\106/\/\119 75定义二元查找树的结点为:struct BSTreeNode // a node in the binary search tree (BST){ int m_nValue; // value of node BSTreeNode *m_pLeft; // left child of node BSTreeNode *m_p... 阅读全文
posted @ 2014-02-25 22:56 idealing 阅读(228) 评论(0) 推荐(0) 编辑