about | help | code help+videos | done | prefs |
Write a method that accepts an array of integers in non-decreasing order (meaning each successive value will be the same or greater than the previous value). Return a new array of integers with all of the duplicates removed. See the test data for examples. Note that the input parameter array will contain at least one number and that for all values in the array value(n)<=value(n+1). sep9_2016_HL_removeDuplicates([5, 7, 8, 9, 11, 14, 17]) → [5, 7, 8, 9, 11, 14, 17] sep9_2016_HL_removeDuplicates([7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12]) → [7, 8, 9, 10, 11, 12] sep9_2016_HL_removeDuplicates([4]) → [4] ...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