| about | help | code help+videos | done | prefs |
Given an ArrayList of Integers, return the index of the LAST element whose value is identical to the value after it. Return -1 if no elements of the list are equal to their neighbors. apcsaListFindLastNeighbors([3, 4, 4, 3]) → 1 apcsaListFindLastNeighbors([1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9]) → 8 apcsaListFindLastNeighbors([1, 2, 3, 4, 5, 6, 7, 8, 9]) → -1 ...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: 220
Copyright Nick Parlante 2017 - privacy