SHARE
TWEET

Untitled

a guest Jun 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function quickSort(items, left, right) {
  2.   var index;
  3.  
  4.   if (items.length > 1) {
  5.     index = partition(items, left, right);
  6.  
  7.     if (left < index - 1) {
  8.       quickSort(items, left, index - 1);
  9.     }
  10.  
  11.     if (index < right) {
  12.       quickSort(items, index, right);
  13.     }
  14.   }
  15.  
  16.   return items;
  17. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top