
算法和数据结构
多情码农无情码
代码不只是代码,更是人类追求的艺术。
展开
-
快排
基于左神的快排 public class QuickSort { public static void quickSort(int[] arr) { if (arr == null || arr.length < 2) { return; } quickSort(arr, 0, arr.length ...原创 2019-09-05 10:14:10 · 268 阅读 · 0 评论 -
堆排序
基于左神的堆排序 public class HeapSort { public static void heapSort(int[] arr) { if (arr == null || arr.length < 2) { return; } for (int i = 0; i < arr.length...原创 2019-09-05 10:24:00 · 248 阅读 · 0 评论 -
BFTRP
public class BFTRP{ public static int getMinKthByBFTRP(int[] arr, int k){ int[] copyArr = copyArray( arr ); return bfprt(copyArr,0,copyArr.lengthk-1,k-1); } public stat...原创 2019-09-05 11:38:54 · 483 阅读 · 1 评论