2014年3月31日

第一题

摘要: 1.把二元查找树转变成排序的双向链表(树)题目:输入一棵二元查找树,将该二元查找树转换成一个排序的双向链表。要求不能创建任何新的结点,只调整指针的指向。 10 / / 6 14/ / / /4 8 12 16转换成双向链表4=6=8=10=12=14=16。我的解答:#include#include#include#include#include#includeusingnamespacestd;structBSTreeNode{intm_nValue;//valueofnodeBSTreeNode*m_pLeft;//leftchildofnodeBSTreeNode*m_pRight;// 阅读全文

posted @ 2014-03-31 10:26 albert1017 阅读(184) 评论(0) 推荐(0)

导航