| about | help | code help+videos | done | prefs |
apcsaStringsMostRepeated
Given two String inputs a and b, find and return the three-character substring from a that occurs the most times in b. If no substrings from a are found in b, return an empty String. If a tie occurs, return the first substring from a that occurs the most times. Precondition: a.length() > 2. HINT: you will probably want a nested loop structure here as well, but the two loops are likely to have very different bounds.apcsaStringsMostRepeated("aaaBBB", "aaa aaa BBB") → "aaa" apcsaStringsMostRepeated("abc", "abcabcabc") → "abc" apcsaStringsMostRepeated("abcdef", "bcd") → "bcd" ...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: 300
Copyright Nick Parlante 2017 - privacy