- 博客(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
130
原创 1003快速排序
我第一次写的快排:运行程序时发现可以,但是程序会超时#includevoid 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
407
原创 1002:归并排序
#includevoid 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
428
原创 C1001:二分查找
#includebool 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
362
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人