Talk:Longest string challenge: Difference between revisions

Line 24:
::: Now you have me curious, you must have a rereading solution in mind. If the description were to read from standard input or a file, that would allow rereading. I'd probably want to see a comment to the effect that it would break on stdin. Since this is more about alternate/creative ways around the restrictions, I think it would be fine. --[[User:Dgamey|Dgamey]] 07:09, 14 August 2011 (UTC)
:::: If you can read the file twice then there's no need to keep an accumulator. Read once to find longest length, read again, along the way print anything that long. --[[User:Ledrug|Ledrug]] 07:47, 14 August 2011 (UTC)
::::: Ah, obvious (now that I'm up and had coffee). As worded the task also does not prohibit the use of a temporary file either. --[[User:Dgamey|Dgamey]] 15:13, 14 August 2011 (UTC)
 
==Restrictions==
Anonymous user