Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 315 Bytes

README.md

File metadata and controls

2 lines (2 loc) · 315 Bytes

Test_task

Write a function (method) and unit tests for the following task: 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"