| about | help | code help+videos | done | prefs |
Given an array of ints, the best one is the one that has the greatest difference from its following neighbor. bestLoner([1, 2, 5, 3, 2, 1]) → 1 bestLoner([9, 2, 3, 4, 3, 4, 5, 2]) → 0 bestLoner([2, 2, 3, 4, 3, 4, 5, 9]) → 6 ...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: 299
Copyright Nick Parlante 2017 - privacy