Quicksort Algorithm Using Lomuto partition Scheme-Lomuo分割方案的快速排序算法

 QuickSort is another algorithm form Divide and Conquer category.It operates by breaking down large problems into smaller,more easily solvable problems. 快速排序是分治算法分类中的另一种算法,它通过把大问题拆分成更小,更容易解决的问题操作。 The idea of QuickSort is the following: a pivot element is picked.The versions of QuickSort differ in the way of pivot picking.First,last,median,or a randomly selected element is a candidate to be picked, as the … Read more

Merge Sort Algorithm-归并排序

Merge Sort belongs to the category of Divide and Conquer algorithms. These algorithms operate by breaking down large problems into smaller, more easily solvable problems.   归并排序属于分治算法分类,这些算法通过把大的问题拆分成更小的,更容易解决的问题操作。   The idea of the merge sort algorithm is to divide the array in half over and over again util each piece is only one item long.Then those … Read more

Insertion Sort Algorithm-插入排序算法

Insertion Sort is a simple sorting algorithm that works the way we sort playing cards in our hands.We sort the first two cards and then place the third card in the appropriate position within the first two, and then the fourth is positioned within the first three,and so until the whole hand is sorted. 插入排序也是一种简单的排序算法,它的原理跟我们玩扑克牌排序一样。首先排序前两张牌,然后在他们中合适的未知插入第三张牌,然后在前三张合适的位置插入第四张,直到手里的牌全部有序。 … Read more

Selection Sort Algorithm-选择排序算法

     Selection Sort is a simple sorting algorithm that find the smallest element in the array and swaps it with the element in the first position, then find the second smallest element in and swaps it with the element in the second position,and continues in this way until the entire array is sorted.   选择排序是一种简单的排序算法,首先查找数组中最小的元素,跟数组元素第一位交换,然后查找第二小的元素,跟数组第二位元素交换,依此类推,直到整个数组元素有序。 … Read more

Bubble Sort Algorithm-冒泡排序

    Bubble sort is an algorithm that is used to sort a list of elements,for example elements in an array. This algorithm compares two adjacent elements and then swaps them if they are not in order. The process is repeated util no more swapping is needed.       冒泡排序是对一系列元素排序的一种算法,比如数组中的元素。该算法对比相邻的元素,如果顺序不对则交换它们。 该过程一直重复,直到不需要交换为止       The main advantage of Bubble Sort … Read more