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

 

norm.krumpe@muohio.edu arraywarmup > sumArrays
prev  |  next  |  chance

Given two arrays of equal length, return a new array where each element is the sum of the corresponding two elements in the original arrays.


sumArrays([1, 1], [4, 10]) → [5, 11]
sumArrays([2, 4, 6], [6, 4, 2]) → [8, 8, 8]
sumArrays([0, 0, 0, 0], [1, 2, 3, 4]) → [1, 2, 3, 4]

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

int[] sumArrays(int[] a, int[] b) { }

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