Anonymous user
Rep-string: Difference between revisions
Use new name rep-string
(Use new name rep-string) |
|||
Line 1:
{{draft task}}
Given a series of ones and zeroes in a string, define a repeated string or ''rep-string'' as a string which is created by repeating a substring of the ''first'' N characters of the string ''two or more times, truncated on the right to the length of the input string''.
For example, the string <code>'10011001100'</code> is a
The task is to:
* Write a function/subroutine/method/... that takes a string and returns an indication of if it is a
* Use the function to indicate the repeating substring if any, in the following
<pre>'1001110011'
|