数据结构
文章平均质量分 76
lvjiabing_it
这个作者很懒,什么都没留下…
展开
-
已知二叉树前序中序,构造一课二叉树
#include<iostream> #include<queue> using namespace std; struct Btnode { struct Btnode *left; struct Btnode *right; int value; }; typedef struct Btnode *BTree; int index = -1; int pre...原创 2018-05-11 10:02:08 · 285 阅读 · 0 评论 -
二叉树中和为某一值的路径
题目:输入一棵二叉树和一个整数,打印出二叉树中节点值的和为输入整数的所有路径。#include<iostream> #include<vector> using namespace std; struct BTnode{ struct BTnode *left; struct BTnode *right; int value; }; typedef struct ...原创 2018-05-12 10:36:49 · 128 阅读 · 0 评论