![](https://img-blog.csdnimg.cn/20200228153731291.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
算法图解 记录
算法图解记录
Aleo阿乐
这个作者很懒,什么都没留下…
展开
-
算法 - 选择排序
选择排序 #include <stdio.h> #include <stdlib.h> int findSmallest(int *arr, int len){ int smallest = arr[0]; int smallest_index = 0; for(int i =1;i < len;i++){ if(arr[i] < smallest...原创 2020-02-29 14:28:25 · 102 阅读 · 0 评论 -
算法 - 二分查找
二分查找 #include <stdio.h> int binarySearch(int[], int, int); int main(){ int myList[]={1, 3, 5, 7, 9}; int len = sizeof(myList) / sizeof(myList[0]); //len的值为5, myList字节长度为20, 其中 myList[0]字节长...原创 2020-02-28 22:49:18 · 63 阅读 · 0 评论