about | help | code help+videos | done | prefs |
Write a method that accepts an array of numbers and a specific number to be removed from the array. Return a new array of the same length, but with the 'remove' number removed from the array. Shift all the other numbers over, and place zeros at the end of the array for each removed number. Look at the test data for clarification. cedarEliminateNums([16, 4], 4) → [16, 0] cedarEliminateNums([4, 5, 6, 6, 5, 4, 1], 6) → [4, 5, 5, 4, 1, 0, 0] cedarEliminateNums([17, 17, 17, 3, 167, 17, 4], 17) → [3, 167, 4, 0, 0, 0, 0] ...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