
数据结构
云起迎风燕
这个作者很懒,什么都没留下…
展开
-
快速排序(java,python)
python快速排序: 方法一: def quick_sort(L, start, end): if start >= end: return low, high, pivot = start, end, L[start] while low < high: while (low < high) and (L[high...原创 2019-05-08 14:29:30 · 118 阅读 · 0 评论 -
归并排序(java,python)
Python: 方法一: # 归并排序 def merge(left, right): c = [] j = h = 0 while j < len(left) and h < len(right): if left[j] < right[h]: c.append(left[j]) j ...原创 2019-05-09 09:46:08 · 132 阅读 · 0 评论 -
使用Java语言编写冒泡排序
public static int[] sort(int[] array){ for(int i=0;i<array.length-1;i++){ for(int j=0;j<array.length-1-i;j++){ if(array[j]>=array[j+1]){ ...原创 2019-05-22 16:10:59 · 153 阅读 · 0 评论