about | help | code help+videos | done | prefs |
Write a method that accepts two arrays of non-negative integers. The method returns the sum of all of the integers in the two arrays with the following exceptions: #1 Do not count any EVEN numbers that have the same value in the same location in both arrays. For example, if both arrays have a 6 in the third position then neither of those count towards the sum. #2 Do not count any numbers that do not have a matching position in the other array. So if one array is 3 numbers long and the other array is 100 numbers long, only the first three numbers from the second array would count, provided they did not violate rule #1 above. sliceSum([], []) → 0 sliceSum([5, 2, 3, -24], []) → 0 sliceSum([10], [20]) → 30 ...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: 280
Copyright Nick Parlante 2017 - privacy