Skip to content

Latest commit

 

History

History

quick-sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Quick sort

Description

Uses a divide and conquer methodology like merge sort.
It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.
Here, we will chose the last element as the pivot.

Quick sort

Complexity

Runtime: O(n log(n)) on average and O(n^2) in the worst case (low probability)
Memory: O(log (n))

Implementations

Resources

https://www.youtube.com/watch?v=SLauY6PpjW4