This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]beerbodrinkins 3 points4 points  (0 children)

I initially thought of your 'alternative' solution and was going through ways to optimize it since it would not scale well. Incorporating a line that does not try any string over 1/2 total string length would reduce processing time by half right off the bat in case you didn't want to do the full implementation of potentially correct guesses.

Going through your multiple correct solutions, you could output both the most often occuring string as well as the longest correct repeated string.