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

 

tmhscs@gmail.com sort > sort_bubbleSort
prev  |  next  |  chance

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


sort_bubbleSort([3, 2, 1]) → [1, 2, 3]
sort_bubbleSort([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_bubbleSort([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_bubbleSort(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