- 博客(4)
- 收藏
- 关注
原创 Daily Coding [1/60]
1. 二叉树的最短路径 1.1 题目描述 Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node… 1.2 广度优先搜索(层次遍历) 题...
2019-07-22 01:01:57
91
原创 1003快速排序
我第一次写的快排:运行程序时发现可以,但是程序会超时 #include void qsort(int low,int high,int *a); int main() { int a[10000]={0}; int n=0,i=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",a[i]); qsort(0,n-1,a); for(i=0;i<n
2016-04-11 23:55:18
367
原创 1002:归并排序
#include void Merge(int low,int mid,int high,int *a,int *b); void Merge_Sort(int low,int high,int *a,int *b); int main() { int source[10000]={0},goal[10000]={0},i,n=10; scanf("%d",&n);
2016-04-08 19:11:20
391
原创 C1001:二分查找
#include bool binarySearch(int length,int* a,int goal); int main() { int a[50000]={0},b[50000]={0}; int length=0,number=0; int i=0; scanf("%d",&length); for(i=0;i {
2016-04-07 17:20:26
323
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人