Talk:Rep-string: Difference between revisions
Content added Content deleted
(→Clarification: added a couple of comments. -- ~~~~) |
|||
Line 4: | Line 4: | ||
==Clarification== |
==Clarification== |
||
The task needs some clarifation. What is a repeat? Is string "10" itself repeated once? Is string "101" a repeat of "10"? When finding a repeated substring "if any", what's the preferred answer for "1111", is it "1" or "11", or even "111" and "1111"? There needs be a clear definition of the word "repeat", not just relying on whatever the first sample solution says, beause can be too arbitrary. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 03:53, 12 May 2013 (UTC) |
The task needs some clarifation. What is a repeat? Is string "10" itself repeated once? Is string "101" a repeat of "10"? When finding a repeated substring "if any", what's the preferred answer for "1111", is it "1" or "11", or even "111" and "1111"? There needs be a clear definition of the word "repeat", not just relying on whatever the first sample solution says, beause can be too arbitrary. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 03:53, 12 May 2013 (UTC) |
||
:I think I was most sloppy about ''"a series of ones and zeroes in a string"'': I meant a series of ones ''or'' zeroes. .. Oh wait .. Re-reading your question, repeat means "two or more times" which is in the description. |
:I think I was most sloppy about ''"a series of ones and zeroes in a string"'': I meant a series of ones ''or'' zeroes. .. Oh wait .. Re-reading your question, repeat means "two or more times" which is in the description. |
||
Line 13: | Line 12: | ||
:# If any valid Y is found then X is a rep-string. |
:# If any valid Y is found then X is a rep-string. |
||
:Hope this helps :-) --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:22, 12 May 2013 (UTC) |
:Hope this helps :-) --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:22, 12 May 2013 (UTC) |
||
::To answer the question: is "101" a repeat of "10"? Yes. Repeated (twice, and then truncated) to the original length of three. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:22, 13 May 2013 (UTC) |
|||
::By the way, almost all programming examples have incorrect output, showing strings to be non-reps, whilest in fact, they are. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:22, 13 May 2013 (UTC) |
|||
==Reason for update request== |
==Reason for update request== |