When.com Web Search

Search results

  1. Results From The WOW.Com Content Network
  2. Sorting algorithm - Wikipedia

    en.wikipedia.org/wiki/Sorting_algorithm

    Radix sort is an algorithm that sorts numbers by processing individual digits. n numbers consisting of k digits each are sorted in O(n · k) time. Radix sort can process digits of each number either starting from the least significant digit (LSD) or starting from the most significant digit (MSD). The LSD algorithm first sorts the list by the ...

  3. Sorting - Wikipedia

    en.wikipedia.org/wiki/Sorting

    Sorting refers to ordering data in an increasing or decreasing manner according to some linear relationship among the data items. ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with similar properties. Ordering items is the combination of categorizing them based on equivalent order, and ordering ...

  4. Timsort - Wikipedia

    en.wikipedia.org/wiki/Timsort

    Timsort is a stable sorting algorithm (order of elements with same key is kept) and strives to perform balanced merges (a merge thus merges runs of similar sizes). In order to achieve sorting stability, only consecutive runs are merged. Between two non-consecutive runs, there can be an element with the same key inside the runs.

  5. Quicksort - Wikipedia

    en.wikipedia.org/wiki/Quicksort

    auxiliary (Hoare 1962) Optimal. No. Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 [1] and published in 1961. [2] It is still a commonly used algorithm for sorting. Overall, it is slightly faster than merge sort and heapsort for randomized data, particularly ...

  6. Insertion sort - Wikipedia

    en.wikipedia.org/wiki/Insertion_sort

    Insertion sort. Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time by comparisons. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort. However, insertion sort provides several advantages:

  7. Selection sort - Wikipedia

    en.wikipedia.org/wiki/Selection_sort

    Selection sort. In computer science, selection sort is an in-place comparison sorting algorithm. It has an O (n2) time complexity, which makes it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity and has performance advantages over more complicated algorithms in ...

  8. Bubble sort - Wikipedia

    en.wikipedia.org/wiki/Bubble_sort

    Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the input list element by element, comparing the current element with the one after it, swapping their values if needed. These passes through the list are repeated until no swaps have to be performed during a pass, meaning that the ...

  9. Comb sort - Wikipedia

    en.wikipedia.org/wiki/Comb_sort

    Comb sort's passes do not completely sort the elements. This is the reason that Shellsort gap sequences have a larger optimal shrink factor of about 2.25. One additional refinement suggested by Lacey and Box is the "rule of 11": always use a gap size of 11, rounding up gap sizes of 9 or 10 (reached by dividing gaps of 12, 13 or 14 by 1.3) to 11.