master-algorithms-py/sorting
2023-08-02 21:00:21 -07:00
..
bubble_sort.py Create bubble_sort.py 2023-08-02 20:53:18 -07:00
bucket_sort.py Create bucket_sort.py 2023-08-02 20:56:20 -07:00
counting_sort.py Create counting_sort.py 2023-08-02 20:55:05 -07:00
insertion_sort.py Create insertion_sort.py 2023-08-02 20:54:05 -07:00
merge_sort.py Create merge_sort.py 2023-08-02 20:56:55 -07:00
quick_sort.py quick_sort.py 2023-08-02 20:57:44 -07:00
README.md Update README.md 2023-08-02 21:00:21 -07:00
seletction_sort.py Create seletction_sort.py 2023-08-02 20:52:30 -07:00

sorting


  • inversions in a sequence is a pair of elements that are out of order with respect to the ordering relation. a sorting algorithm is a sequence of operations that reduces inversions to zero.

  • a topological sort of a directed graph is a way of ordering the list of nodes such that if (a, b) is a edge of the graph, then a appears before b. this type of sorting does not work if a graph has cycles or is not directed.

  • because of their efficiencies, you usually want to use either merge sort or quick sort (O(N log (N)).

  • other type of sorting algorithms can be seen below and in this directory's source code: