算法学习记录
ImDominant
这个作者很懒,什么都没留下…
展开
-
算法:各类排序
1./* Name:quicksort(从小到大) Coder:LJh Time:3'46 Debug过程:发现漏写"using namespace std;" Instruction: intput: 第一行:n//代表排序数字数量 第二行:n个数字,空格隔开 output:n个数字从小到大输出 算法思想参考:http://developer.5原创 2016-03-19 23:09:00 · 355 阅读 · 0 评论 -
算法:回溯算法之九宫格
/* Name:九宫格 Coder:Lou Jianghui Test case: case 1: Input: 8 0 0 0 0 0 0 0 0 0 0 3 6 0 0 0 0 0 0 7 0 0 9 0 2 0 0 0 5 0 0 0 7 0 0 0 0 0 0 0 4 5 7原创 2016-02-27 00:00:14 · 1280 阅读 · 0 评论 -
算法:回溯算法之floodfill
/* Name:floodfill-4dir Coder:Lou Jianghui */ Code #include<iostream> #include<stdlib.h> using namespace std; #define N 10 int dir[4][2] = { 0, -1, 0, 1, -1, 0, 1, 0, }; char map[N+1]原创 2016-02-27 00:12:16 · 395 阅读 · 0 评论 -
算法:堆排序之每次输入插一次堆&输入完成后建堆
1./* Name:插入堆排序(A[0]为空情况) Coder:Lou Jianghui Time:22:49-23:07 */#include<iostream> #include<stdlib.h> #include<algorithm> using namespace std; int A[1000]; int n;void print(int n) { for (int i = 1;原创 2016-02-27 00:38:25 · 600 阅读 · 0 评论