![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基本算法
skoohpy
这个作者很懒,什么都没留下…
展开
-
二分查找
//二分查找//查找前提是数列有序,以下程序以数组升序为例#include <stdio.h>#define MaxSize 10000typedef struct LNode* List;struct LNode { int Element[MaxSize]; int Length;};struct LNode L;List Tbl;int BinarySearch(List Tbl, int K){ int left, mid, right; int NoF.原创 2020-10-08 22:42:31 · 81 阅读 · 0 评论 -
快速排序(一种分治的思想)——C语言
#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */void Quicksort(int a[], int low, int high){ if (low >= high) return; int k = a[1],...原创 2020-10-03 15:22:30 · 160 阅读 · 0 评论