about | help | code help+videos | done | prefs |
Write a method that returns 'nums', but with each occurrence of 'toReduce' reduced by 'reduceBy'. For example, if 'nums' is {45,67,28,67,15} and 'toReduce' is 67 and 'reduceBy' is 7, you would return {45,60,28,60,15} (because each of the 67's was reduced by 7). test2024_01_22_APP1SLHL_reduceNumBy([35, 35, 46, 72, 35, 8, 34, 36, 1], 35, 30) → [5, 5, 46, 72, 5, 8, 34, 36, 1] test2024_01_22_APP1SLHL_reduceNumBy([], 17, 3) → [] test2024_01_22_APP1SLHL_reduceNumBy([80], 80, -2) → [82] ...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: 240
Copyright Nick Parlante 2017 - privacy