about | help | code help+videos | done | prefs |
quickSort
You might want to study quick sort for a suitable time, and also implement it iteratively before you dive into this one. The challenge is to solve it purely recursively. No loops whatsoever. Define a function quickSort that when passed an array, a starting index, and an ending index, sorts it using quick sort and returns the array. quickSort([8, 1, 9, 2, 5, 4, 3]) → [1, 2, 3, 4, 5, 8, 9] quickSort([7, 6, 8, 1, 9, 0, 2, 5, 4, 3]) → [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] quickSort([1729]) → [1729] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 5 Post-solution available
Copyright Nick Parlante 2017 - privacy