Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function quickSort(items, left, right) {
- var index;
- if (items.length > 1) {
- index = partition(items, left, right);
- if (left < index - 1) {
- quickSort(items, left, index - 1);
- }
- if (index < right) {
- quickSort(items, index, right);
- }
- }
- return items;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement