- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 贪心算法——普林姆算法(Greedy Algorithm-Prim's Algorithm)
贪心算法——普林姆算法(Greedy Algorithm-Prim’s Algorithm)贪心算法简介(Introduction of Greedy Algorithm) (pic: https://www.sicas.cn/Students/Info/Content_110622143056742.shtml)There is a common situation in which a c
2017-05-31 17:06:49 2795 1
原创 排序算法——归并排序(Merge Sort)
排序算法——归并排序(Merge Sort)算法简介(Merge Sort) Merge sort is an excellent application of “Divide-and-Conquer” algorithmic technique. It starts by dividing an array A[0..n-1] into two halves B[0..n/2-1] and C
2017-05-30 13:06:52 1015
原创 排序算法——希尔排序(Shell Sort)
排序算法——希尔排序(Shell Sort)算法简介(Introduction) Insertion sort shifts elements which are out of order one position. For example, an array 1, 3, 2, 4, 5. Shift 3 to 2. It turns 1, 2, 3, 4, 5. The distance of
2017-05-29 18:46:29 843
原创 排序算法——堆排序(Heap Sort)
排序算法——堆排序(Heap Sort)堆(Heap) Heap is a complete binary tree which satisfies the heap condition: Each child has a key which is no greater than its parent’s.There are some trees, which are heaps? which
2017-05-29 10:04:07 1063
原创 排序算法——快速排序(Quick Sort)
排序算法——快速排序(Quick Sort)算法简介(Introduction) Quick sort is based on devide-and-conquer approach. A big problem is decided into small problems, and then solve small problem first. For example, 100 elements
2017-05-28 17:35:04 1090
原创 排序算法——冒泡排序(Bubble Sort)
排序算法——冒泡排序(Bubble Sort)算法简介(Introduction) Bubble sort is to compare adjacent elements of the list and exchange them as long as they are out of order. By repeatly compare and exchange, the largest elem
2017-05-28 14:33:30 787
原创 排序算法——选择排序(Selection Sort)
排序算法——选择排序(Selection Sort)算法简介(Introduction) We start selection sort by scanning entire given list to find its smallest element and exchange it with the first element, putting the smallest element in
2017-05-28 12:58:40 856
原创 排序算法——插入排序(Insertion Sort)
排序算法——插入排序(Insertion Sort)伪代码(Pseudocode):function INSERTIONSORT(A[0..n-1]) for i ⟵ 1 to n-1 do v ⟵ A[i] j ⟵ i-1 while j ≥ 0 and v < A[j] do A[j+1] ⟵ A[j]
2017-05-27 12:18:53 1140
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人