Talk:Longest string challenge: Difference between revisions

(→‎Rereading: easy way to allow)
Line 23:
:: Well, my preference is that given that the task is to read from "standard input", and standard input may not be a seekable file, this is prohibited implicitly (and so should also be prohibited explicitly to avoid permitting semi-broken solutions). —[[User:Kevin Reid|Kevin Reid]] 14:43, 13 August 2011 (UTC)
::: 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)
 
==Restrictions==
Anonymous user