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

 

andersoniii.edwin@cusd80.com week9 > findOddEvenInArrays
prev  |  next  |  chance

Given an array of integers, write the method to count the number of odd integers and the number of even integers - Return an integer array where in array[0] contains the number of even integers and array[1] contains the number of odd integers. If the array is empty, pass back an array with zeros located in both array locations.


findOddEvenInArrays([1, 2, 3, 4]) → [2, 2]
findOddEvenInArrays([]) → [0, 0]
findOddEvenInArrays([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) → [6, 5]

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

public int[] findOddEvenInArrays(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: 100

Copyright Nick Parlante 2017 - privacy