![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
CodingFishzhi
物联网/人工智能
展开
-
线段树 c++实现
#include<cstdio> #include<iostream> using namespace std; #define MAXSIZE 1000 void build_tree(int arr[], int tree[], int node, int start, int end){ if(start == end){ tree[node] = arr[start]; }else{ int mid = (start +原创 2020-08-16 17:40:02 · 424 阅读 · 0 评论 -
【数据结构】单链表的初始化及其运算操作
#include <iostream> #include <cstdio> #include <stdlib.h> using namespace std; //定义单链表的节点 typedef struct LNode{ int data; struct LNode *next; }LNode, *LinkList; bool InsertPriorNode(LinkList &L,LNode *p, LNode *s); bool Inse原创 2020-07-27 22:14:15 · 1542 阅读 · 0 评论