- 博客(5)
- 收藏
- 关注
原创 阶乘的递归与非递归
//递归: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; int n; LL fibo(int n) { if(n == 2 || n == 1) return 1; return fibo(n - 1) + fibo(n - 2); } int...
2021-11-23 18:11:59
751
原创 斐波那契递归与非递归
递归 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; int n; LL fibo(int n) { if(n == 2 || n == 1) return 1; return fibo(n - 1) + fibo(n - 2); } int ma...
2021-11-23 18:01:08
608
原创 计算快排算法存取数据的时间
//快排算法 #include<stdio.h> #include<malloc.h> #include<time.h> void quickSort(int arr[],int low,int high) { if(high < low ) return; int i = low,j = high,temp = arr[i]; while(i < j) { while(temp < arr[j] &am...
2021-11-19 09:30:05
140
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人