I found quicksort algorithm from this book
This is the algorithm
QUICKSORT (A, p, r)
i
Code Implemented with Iteration With last element as Pivot
https://jsfiddle.net/zishanshaikh/5zxvwoq0/3/
function quickSort(arr,l,u) {
if(l>=u)
{
return;
}
var pivot=arr[u];
var pivotCounter=l;
for(let i=l;ihttps://jsfiddle.net/zishanshaikh/exL9cdoe/1/
Code With first element as Pivot
//Logic For Quick Sort
function quickSort(arr,l,u) {
if(l>=u)
{
return;
}
var pivot=arr[l];
var pivotCounter=l+1;
for(let i=l+1;i