我知我心
我知我心
全部文章
分类
acm(8)
c++(10)
c语言(29)
django(14)
html,css(9)
javascript(3)
linux(3)
python(30)
剑指offer(6)
动态规划(6)
工具(3)
数据库(2)
数据结构(12)
贪心算法(8)
归档
标签
去牛客网
登录
/
注册
我知我心的博客
全部文章
(共143篇)
选择排序
//对六个数从小到大排序 #include<stdio.h> int main() { int i,j,temp,a[6] = {1, 3, 5, 2, 4, 6}; for (i=0; i<6-1; i++) { for (j=i+1; j...
2020-08-21
0
421
堆排序
include <stdio.h> //array是待调整的堆数组,i是待调整的数组元素的位置,nlength是数组的长度 //本函数功能是:根据数组array构建大根堆 void HeapAdjust(int array[],int i,int nLength) { int n...
2020-08-21
0
560
希尔排序
#include<stdio.h> int main() { int a[10] = {49, 38, 65, 97, 26, 13, 27, 49, 55, 4}; int i, j, gap, n = 10; for (gap = n / 2; gap >...
2020-08-21
0
528
vector容器基本用法
#include<iostream> #include"vector" using namespace std; void printV(vector<int> &v1) //用来输出容器 { for (vector<int...
2020-08-21
0
542
deque容器基本操作
#include<iostream> using namespace std; #include"deque" #include"algorithm" void printD(deque<int> &d1) //输出d...
2020-08-21
0
465
stack容器基本操作
#include<iostream> using namespace std; #include"stack" void f1() { stack<int> s1; //入栈 for(int i = 0; i < 10; ...
2020-08-21
0
579
栈的基本操作
#include<stdio.h> #include<stdlib.h> //栈结点的定义 typedef struct stacknode { char data; struct stacknode *next; }stacknode; //构造空栈 s...
2020-08-21
0
499
顺序栈的定义和基本算法
//顺序栈的定义和基本算法 #include<stdio.h> #include<stdlib.h> #define stacksize 100 typedef char datatype; //定义顺序栈 typedef struct { datatype dat...
2020-08-21
0
623
二叉树的基本运算
#include<stdio.h> #include<stdlib.h> //二叉树结点定义 typedef struct BT { char data; struct BT *lchild; struct BT *rchild; }BT; //建...
2020-08-21
0
647
二叉树遍历(前序,中序,后序)
#include <stdio.h> #include <stdlib.h> #define MAXSIZE 20 //二叉树结点的结构体表示形式 typedef struct BitNode { char data; struct BitNode* ...
2020-08-21
0
544
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页