- 博客(5)
- 收藏
- 关注
原创 minishell实现
#include<stdio.h> #include<unistd.h> #include<string.h> #include<stdlib.h> #include<ctype.h> #include<sys/wait.h> int main() { //获取用户输入 //解析用户输入 //创建子进程...
2020-03-01 13:47:17
304
原创 递归
C语言字符串 字符串递归逆置 void reserve_str(char *str,int sSize) { if(sSize <= 1) { return ; } else { char temp = str[0]; str[0] = str[sSize-1]; str[sSize-1]='\0'; reserve_str(str+1,sSize-2); ...
2020-02-12 13:14:04
184
原创 排序算法-选择排序
选择排序 #include<iostream> using namespace std; void Select_Sort(int arr[],int len) { int min; int tmp; for(int i = 0;i < len-1;++i) { min = i; tmp = arr[i]; for(int j = i+1;j < len...
2019-12-21 18:49:37
136
原创 排序算法--冒泡排序
冒泡排序 #include<iostream> using namespace std; void Bubble_Sort(int arr[],int len) { for(int i=0;i<len-1;i++) { for(int j=0;j<len-1-i;j++) { if(arr[j]>...
2019-12-21 18:41:13
134
原创 排序算法-插入排序
插入排序 #include<iostream> using namespace std; void Insert_Sort(int arr[],int len) { for(int i = 1;i < len;++i) { int tmp = arr[i]; int j; for(int j = i+1;j >= 0;) { if(arr[j] &...
2019-12-21 14:30:55
153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人