about | help | code help+videos | done | prefs |
Use recursion to write a sorting function genSort(aList) which takes in aList and should return a list with the same elements as aList, but in ascending order. Feel free to use the Python max or min functions. Example: for input [7, 9, 4, 3, 0, 5, 2, 6, 1, 8], return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]. genSort([7, 4, 3, 0, 5, 2, 6, 1]) → [0, 1, 2, 3, 4, 5, 6, 7] genSort([]) → [] genSort([0, 1, 2, 3, 4, 5, 6]) → [0, 1, 2, 3, 4, 5, 6] ...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: 150 Post-solution available
Copyright Nick Parlante 2017 - privacy