about | help | code help+videos | done | prefs |
Write a method that returns the longest string in an array of strings. If there are ties for longest string, return the last of the strings of that length. For this program, you have a restricted subset of string methods you may use. You may use any combination of: .equals .substring .charAt .length but you may not use any other string methods. olympicLongString([]) → "" olympicLongString(["this", "is", "a", "test", "of", "you"]) → "test" olympicLongString(["a", "ab", "abc", "abcd", "abcde"]) → "abcde" ...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: 290
Copyright Nick Parlante 2017 - privacy