
算法
klmyty
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python 归并排序
def merge(arr,l,m,r,temp): k = l i = l j = m+1 while i<m+1 and j<r+1: if arr[i]<arr[j]: temp[k]=arr[i] i+=1 else: temp[k]=arr[j] j+=1 k+=1 #将左右两边剩余的数字直接加入到原创 2021-06-22 10:43:19 · 109 阅读 · 0 评论 -
Python 快速排序
#!/usr/bin/python3def quickSort(arr,low,high): i=low j=high temp=arr[low] while i<j: #从后往前搜索找到小于temp的值所在位置 while arr[j] > temp and j > i: j -= 1 if j > i: arr[i] = arr[j]原创 2021-06-18 14:42:26 · 102 阅读 · 0 评论 -
装载问题
#include <iostream>#include<fstream>#include<stdio.h>using namespace std;template<class Type>class Loading{ //friend Type MaxLoading(Type[],Type,int);//private:pu...原创 2019-04-17 16:51:42 · 363 阅读 · 0 评论