about | help | code help+videos | done | prefs |
Write a method that takes two int arrays, adds corresponding elements and returns an array containing the sums. Both arrays must contain the same number of elements. If they are different lengths, the empty array must be returned. raAdd([1, 2, 3], [1, 2, 3]) → [2, 4, 6] raAdd([1, 2, 3], [0, 0, 0]) → [1, 2, 3] raAdd([-1, 2, -3], [0, 0, 0]) → [-1, 2, -3] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy