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

 

zbaharav@kehillah.org > arrayPlus
prev  |  next  |  chance

Given an input array A and a number n, return a new array where each element is equal to the original plus n.


arrayPlus([1, 2, 3], 5) → [6, 7, 8]
arrayPlus([1, 2], -1) → [0, 1]
arrayPlus([], 9) → []

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

public int[] arrayPlus(int[] A, int n){ }

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