When.com Web Search

Search results

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

    en.wikipedia.org/wiki/Sorting_algorithm

    In computer science, a sorting algorithm is an algorithm that puts elements of a list into an order. ... Tiny code size. Cycle sort 1: No Selection In-place with ...

  3. 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 ...

  4. Quicksort - Wikipedia

    en.wikipedia.org/wiki/Quicksort

    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 on larger distributions. [3]

  5. 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:

  6. 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 ...

  7. Merge sort - Wikipedia

    en.wikipedia.org/wiki/Merge_sort

    In computer science, merge sort (also commonly spelled as mergesort and as merge-sort[2]) is an efficient, general-purpose, and comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the relative order of equal elements is the same in the input and output.

  8. Bogosort - Wikipedia

    en.wikipedia.org/wiki/Bogosort

    Θ ( n × n ! ) {\displaystyle \Theta (n\times n!)} In computer science, bogosort[1][2] (also known as permutation sort and stupid sort[3]) is a sorting algorithm based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. It is not considered useful for sorting, but ...

  9. Counting sort - Wikipedia

    en.wikipedia.org/wiki/Counting_sort

    O ( n + k ) {\displaystyle O (n+k)} In computer science, counting sort is an algorithm for sorting a collection of objects according to keys that are small positive integers; that is, it is an integer sorting algorithm. It operates by counting the number of objects that possess distinct key values, and applying prefix sum on those counts to ...