Open
Description
Instead of this
const pivotElement = array.shift();
// O(n)
we should use
const pivotElement = array.pop();
// O(1)
When taking the pivot as last element 2 test cases are failing.
- QuickSort › should do stable sorting
- QuickSort › should visit NOT SORTED array element specified number of times