上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 1.暴力解法 #include<stdio.h> #include<stdlib.h> void Reverse_p(int arr[], int p, int length) { int index=0; int* A=(int*)malloc(sizeof(int)*length); for(i 阅读全文
posted @ 2021-09-28 18:35 磐正 阅读(27) 评论(0) 推荐(0)
摘要: 1.暴力解法,不推荐使用 #include<stdio.h> void Swap(int& a, int& b) { int temp; temp=a; a=b; b=temp; } void BubbleSort(int arr[], int length) { int temp; for(int 阅读全文
posted @ 2021-09-27 23:33 磐正 阅读(46) 评论(4) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> typedef struct Node { int data; struct Node* next; }Node,*List; void CreateList(List L, int k) { Node* node; Node 阅读全文
posted @ 2021-09-24 22:59 磐正 阅读(66) 评论(0) 推荐(0)
摘要: #include<stdlib.h> #include<stdio.h> //定义结构体 typedef struct Node { int data; struct Node* link; }Node,*List; //创建链表函数 void CreateList(List L, int k) { 阅读全文
posted @ 2021-09-24 00:07 磐正 阅读(16) 评论(1) 推荐(0)
摘要: #include<stdlib.h> #include<stdio.h> //定义结构体 typedef struct Node { int data; struct Node* link; }Node,*List; //创建链表函数 void CreateList(List L, int k) { 阅读全文
posted @ 2021-09-23 22:58 磐正 阅读(63) 评论(0) 推荐(0)
摘要: #include<stdio.h> void MergeSort(int* pa,int* pb) { int arr[12]; int a,b,i; a=b=0; for(i=0;i<12&&a<6&&b<6;i++) { if(*(pa+a)<=*(pb+b)) { arr[i]=*(pa+a) 阅读全文
posted @ 2021-09-23 21:39 磐正 阅读(11) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> typedef struct Node { int data; struct Node* next; }Node, *List; //遍历链表函数 void outputValue(List L) { Node* node=L 阅读全文
posted @ 2021-09-23 00:01 磐正 阅读(17) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; }Node; void changeValue(Node& node)//引用 { node.data++; } void p 阅读全文
posted @ 2021-09-22 10:37 磐正 阅读(107) 评论(1) 推荐(0)
摘要: Position BinarySearch(List L, ElementType X){ Position Left,Right,Mid; Left=1; Right=L->Last; while(Left<=Right){ Mid=(Left+Right)/2; if(X==L->Data[Mi 阅读全文
posted @ 2021-09-22 09:50 磐正 阅读(48) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-04 17:55 磐正 阅读(68) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页