about | help | code help+videos | done | prefs |
Given an integer array, sort it from least to greatest using the Selection Sort Algorithm. On this problem, perform only one swap using the selection sort algorithm. It should find the smallest element in the array and swap it with the first position in the array. sort_selectionSortOnePass([5, 4, 3, 2, 1]) → [1, 4, 3, 2, 5] sort_selectionSortOnePass([4, 3, 2, 5]) → [2, 3, 4, 5] sort_selectionSortOnePass([3, 4, 5]) → [3, 4, 5] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy