about | help | code help+videos | done | prefs |
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 (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 321.0
Copyright Nick Parlante 2017 - privacy