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

 

norm.krumpe@muohio.edu homework4 > loseThe2
prev  |  next  |  chance

Given an array where exactly one of the elements is a 2, return a new array with the 2 removed.


loseThe2([7, 1, 2, 1, 4]) → [7, 1, 1, 4]
loseThe2([2, 3, 4]) → [3, 4]
loseThe2([88, -9, 56, 14, 99, 2]) → [88, -9, 56, 14, 99]

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

int[] loseThe2(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: 200

Copyright Nick Parlante 2017 - privacy