| about | help | done | prefs | create account |
String-3 > sameEnds
prev | next | chance
| Given a string, return the longest substring that appears at both the beginning and end of the string without overlapping. For example, sameEnds("abXab") is "ab".
sameEnds("abXYab") → "ab" sameEnds("xx") → "x" sameEnds("xxx") → "x" ...Save, Compile, Run See Also: Example Code Java help: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 321.0
Copyright Nick Parlante 2006-09 - privacy