| about | help | code help+videos | done | prefs |
Given an ArrayList of String values, find and return the index of the first String value which is lexicographically before the previous element in the list. Return -1 if the list is already sorted in nondescending order, which is what most sorting algorithms will produce. HINT: how do we compare String values again?apcsaListFindOutOfOrder(["a", "b", "a"]) → 2 apcsaListFindOutOfOrder(["a", "b", "c"]) → -1 apcsaListFindOutOfOrder(["find", "me", "something", "good", "today"]) → 3 ...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: 230
Copyright Nick Parlante 2017 - privacy