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

 

jebbert@volusia.k12.fl.us > iglooSortAdvanced2
prev  |  next  |  chance

This method will accept an array of igloo sizes (as measured by the radius). These igloo sizes can be in any order. Return an array of the same size, containing the same elements but in sorted order from lowest to highest. Note that we have "special igloos" which can even have negative sizes! You must write your own sort, but it does not have to be very efficient... although it cannot be so inefficient that it times out! There are many different types of sorts. You can even sort recursively! I just did a quick little "bubble sort".


iglooSortAdvanced2([-5, -2, 50, -50, 0]) → [-50, -5, -2, 0, 50]
iglooSortAdvanced2([5, 7, 8, 11, 18]) → [5, 7, 8, 11, 18]
iglooSortAdvanced2([19, 13, 4, 2]) → [2, 4, 13, 19]

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

public int[] iglooSortAdvanced2(int[] sizes) { }

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: 220

Copyright Nick Parlante 2017 - privacy