MCPcopy Create free account
hub / github.com/alexfertel/rust-algorithms / QuickSort

Class QuickSort

src/sorting/quick_sort.rs:46–46  ·  view source on GitHub ↗

QuickSort is a Divide and Conquer algorithm. It picks an element as a pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways. parameters takes an array The key process in quickSort is a partition(). The target of partitions is, given an array and an element x of an array as the pivot, put x at its correct posit

Source from the content-addressed store, hash-verified

44/// and put all greater elements (greater than x) after x. All this should be done in linear time.
45/// Quicksort's time complexity is O(n*logn) .
46pub struct QuickSort;
47
48impl<T> Sorter<T> for QuickSort
49where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected