id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

norm.krumpe@muohio.edu sortsearchprep > selectionSort
prev  |  next  |  chance

Implement the selection sort algorithm using recursion. <p> Normally, sorting algorithms should have return type void. But codingbat doesn't work that way. So, return the array at the end of the method.


selectionSort([47, 2, 18, 6, 3, 59, 2, 8, 19, 5]) → [2, 2, 3, 5, 6, 8, 18, 19, 47, 59]
selectionSort([4, 3, 2, 1]) → [1, 2, 3, 4]
selectionSort([5]) → [5]

...Save, Compile, Run (ctrl-enter)

int[] selectionSort(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200

Copyright Nick Parlante 2017 - privacy