Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement