随笔分类 - 数据结构
摘要:(29条消息) 二叉树DFS/BFS实现(C++)_aFakeProgramer的博客-CSDN博客_c++二叉树bfs
阅读全文
摘要:背包问题:0-1背包、完全背包和多重背包 - fengzw - 博客园 (cnblogs.com) #include<bits/stdc++.h>using namespace std; int v[] = {0,4,2,3};int w[] = {0, 2,1,3 };int n = 3, m =
阅读全文
摘要:(38条消息) 图——C++实现_Mind_V的博客-CSDN博客_c++ 图
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; #define swap1(a,b) do{int c=a, a =b, b =c}while(0) //将k为根的子树调整为大根堆 void HeadAdjust(int a[], int k, int le
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; class node { public: int data; node* next; node* prev; }; class stack1 { public: stack1(); void push(node
阅读全文
摘要:数据结构与算法——单链表的实现及原理 - Suozhiyuan - 博客园 (cnblogs.com) C/C++语言实现单链表(带头结点) - 两猿社 - 博客园 (cnblogs.com) 链表(单链表)的基本操作及C语言实现 (biancheng.net) //链接1的方法 #include<
阅读全文
摘要:#include<iostream>#include<thread>using namespace std; void fun(int a[],int len){ for(int i =1;i<len;i++){ int temp =a[i]; int j = i-1; while(temp<a[j
阅读全文
摘要:#include<iostream> // // Created by jt on 2020/8/22. // #include <vector> #include <queue> using namespace std; class BiNode { public: int data; BiNod
阅读全文