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

 

sort_selectionSort


Given an integer array, sort it from least to greatest using the Selection Sort Algorithm. If you do not solve it using Selection Sort, then you will not receive credit.


sort_selectionSort([3, 2, 1]) → [1, 2, 3]
sort_selectionSort([5, 4, 9, 6, 8, 4, 2, 5, 1, 2, 5, 3, 2, 1]) → [1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 8, 9]
sort_selectionSort([1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 8, 9]) → [1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 8, 9]

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

public int[] sort_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

Post-solution available

Copyright Nick Parlante 2017 - privacy