![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树
@阿奇@
做一个勤勉、有趣、善良的人
展开
-
树入门及基本操作代码
/* By Vamei */ /* binary search tree */ #include <stdio.h> #include <stdlib.h>typedef struct node *position; typedef int ElementTP;struct node { position parent; ElementTP element; position原创 2017-10-11 15:25:18 · 268 阅读 · 0 评论 -
uva122
#include <iostream> #include <stdio.h> #include <vector> #include <queue> #include <string.h> using namespace std; struct Node { int data; bool vis; Node* ls; Node* rs; Node() {原创 2017-11-03 16:28:32 · 178 阅读 · 0 评论 -
zoj 3664
//暴力lca:这个题,从头找,最后一个符合条件的点就是最近祖先点 //每次画一条线,一个矩形变成2个,这不就是二叉树嘛? #include <stdio.h> #include <iostream> #include <string.h>using namespace std; const int N=3000; struct pot { int x,y; pot(int a,in原创 2017-12-06 11:17:59 · 156 阅读 · 0 评论 -
数据结构总结之树
1.树的添加+bfs例题:uva122#include <iostream> #include <stdio.h> #include <vector> #include <queue> #include <string.h> using namespace std; struct Node { int data; bool vis; Node* ls; Node* r原创 2017-12-18 20:10:13 · 149 阅读 · 0 评论