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

 

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

Write a method that accepts an array of positive integers in any order. Return the same array with the numbers in the same order, except that all the even numbers will come first, followed by all the odd numbers. The original order will be preserved EXCEPT that they will be grouped as described above. Use the test data for clarification.


splitEvenOdd([]) → []
splitEvenOdd([17]) → [17]
splitEvenOdd([6]) → [6]

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

public int[] splitEvenOdd(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: 290

Copyright Nick Parlante 2017 - privacy