about | help | code help+videos | done | prefs |
Write a method that has two integer arrays as input parameters. Return the sum of the first array, excluding any of the numbers in the first array that appear in the second array. So the second array is a list of numbers to exclude when calculating the sum. For example: sumExcludingSLAPHL_Dec2011({5,7,3,4,7}, {3,7}) returns 9 since 5+4=9. It does NOT count the 7, 3, or 7 since those matched numbers in the exclusion array. sumExcludingSLAPHL_Dec2011([4, -2, -3, 6, -3, 7, 3, 1], [-3]) → 19 sumExcludingSLAPHL_Dec2011([4], [4]) → 0 sumExcludingSLAPHL_Dec2011([5, 7], [4, 6, 8]) → 12 ...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: 250
Copyright Nick Parlante 2017 - privacy