about | help | code help+videos | done | prefs |
Write a function for selection_sort, in which the algorithm sorts _in place_ an integer list given by L. Since lists are immutable, this function would normally have no return value, but since CodingBat requires a return value to determine function correctness, please return L. Note that we do not need the function list2string anywhere. selection_sort_better([3, -1, 7, 5, 2, 4, 9, 3, 8, 2]) → [-1, 2, 2, 3, 3, 4, 5, 7, 8, 9] selection_sort_better([-1, 1, 7, 5, 2, 4, 9, 3, 8, 2]) → [-1, 1, 2, 2, 3, 4, 5, 7, 8, 9] selection_sort_better([-1, -2, -3, -4, -5, -5, -6, -7, -7, -8]) → [-8, -7, -7, -6, -5, -5, -4, -3, -2, -1] ...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: 60
Copyright Nick Parlante 2017 - privacy