function quickSort(arr, low, high){
    if(low < high) {
    var l = low, h = high, key = arr[l];
	while (l < h) {
        while (l < h && arr[h] > key){
            h--;
        } 
	    if (l < h){
		    arr[l++] = arr[h];
		}
        while (l < h && arr[l] < key){ 
            l++;
        }
	    if (l < h){
          arr[h--] = arr[l];
        }
	}
	arr[l] = key;
	quickSort(arr, low, l-1);
	quickSort(arr, l+1, high);
}