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

 

abraskin@mbusd.org > remove
prev  |  next  |  chance

Given an array of at least one String and an index, if the index is within the range of the array, return an array withe all the elements except the one at the index. Otherwise return the array unchanged.


remove(["0", "1", "2", "3", "4"], 2) → ["0", "1", "3", "4"]
remove(["A", "B", "C", "D"], -1) → ["A", "B", "C", "D"]
remove(["A", "B", "C", "D"], 0) → ["B", "C", "D"]

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

public String[] remove(String[] arr, int index) { }

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

Copyright Nick Parlante 2017 - privacy