about | help | code help+videos | done | prefs |
increasingDistanceFromZero
The ArrayList<Integer> provided should only contain values that are increasingly far away from zero. Assume the first number is always valid, and that the ArrayList has at least one value. Beyond that, if a number is not farther away from zero than the previous number, it should be removed before checking the next number. Return the list after removing values. increasingDistanceFromZero([1, 2, 3, 4, 5, 6]) → [1, 2, 3, 4, 5, 6] increasingDistanceFromZero([1, 2, -3, 4, -5, 6]) → [1, 2, -3, 4, -5, 6] increasingDistanceFromZero([1, 3, -3, 10, -5, 6, -7, 8, 9, 10]) → [1, 3, 10] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy