Need The answer for using the logic of quick sort in set Interval
<p>Hi all I' tried ou this logic for quick sort program . But I need to convert this code to set Interval mode and need to cover the total process step by step. Please Help me in improving this logic to an setinterval Program . I think currently it's in recursive mode.</p>

<pre><code>function quicksort(arr)
{
    if (arr.length == 0)
        return [];

    var left = new Array();
    var right = new Array();
    var pivot = arr[0];

    for (var i = 1; i &lt; arr.length; i++) {
        if (arr[i] &lt; pivot) {
           left.push(arr[i]);
        } else {
           right.push(arr[i]);
        }
    }

    return quicksort(left).concat(pivot, quicksort(right));
}
</code></pre>
