about | help | code help+videos | done | prefs |
Given an ArrayList of String values all with at least two characters, examine the substring of each String starting with index 1 (second character) to the end. Find and return the original String value, the substring of which is "less than" all the other substrings, as determined by using the compareTo method of the String class. Preconditions: lst contains at least one String, all String values have length() > 1, and no two String values will differ only in the first character. This method is similar to the last one, with the addition of the substring component. apcsaStringCompareFirstSubstring(["cbc", "ecd", "azz"]) → "cbc" apcsaStringCompareFirstSubstring(["12", "23", "31", "32"]) → "31" apcsaStringCompareFirstSubstring(["aApple", "bapple"]) → "aApple" ...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: 240
Copyright Nick Parlante 2017 - privacy