HDU 1710
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1710题意:给二叉树的先序遍历和中序遍历,确定后序遍历解法:复习专业课找的一题,根据先序遍历和中序遍历建树,再对树做后序遍历#include #include using namespace std;struct ...
        
阅读全文
 
            
         
        
            
    HDU 1622
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1622白书上6.3.2二叉树层次遍历的例题,层次遍历用bfs,建立二叉树,很基础的题目#include #include #include #include #include using namespace std...
        
阅读全文
 
            
         
        
            
    HDU 3791
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3791建立二叉树,对比是否相同#include #include #include using namespace std;#define lson rt<<1#define rson rt<<1|1int tre...
        
阅读全文