Talk:Odd word problem: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Explanations: Just ot make sure...)
No edit summary
Line 3: Line 3:
Obviously, this task is not about text processing. Rather, it's about conditional code execution order. The even words are straightforward, while reversing odd words are easy with, say, recursion, with the catch that the word end marker (punctuation) needs to be processed ''after'' the recursion has returned. If peeking ahead is allowed, then this difficulty is removed and the whole thing becomes quite moot. --[[User:Ledrug|Ledrug]] 20:06, 3 November 2011 (UTC)
Obviously, this task is not about text processing. Rather, it's about conditional code execution order. The even words are straightforward, while reversing odd words are easy with, say, recursion, with the catch that the word end marker (punctuation) needs to be processed ''after'' the recursion has returned. If peeking ahead is allowed, then this difficulty is removed and the whole thing becomes quite moot. --[[User:Ledrug|Ledrug]] 20:06, 3 November 2011 (UTC)
:So this is a modified version of the problem that has been linked to? The solutions there seem to use buffers and peeking a lot. The site also says that the words will be a maximum of 20 characters long. Unless I'm missing changes in the spec later in the discussion, maybe there should be no link at all to that site (just to avoid confusion). --[[User:Mwn3d|Mwn3d]] 20:12, 3 November 2011 (UTC)
:So this is a modified version of the problem that has been linked to? The solutions there seem to use buffers and peeking a lot. The site also says that the words will be a maximum of 20 characters long. Unless I'm missing changes in the spec later in the discussion, maybe there should be no link at all to that site (just to avoid confusion). --[[User:Mwn3d|Mwn3d]] 20:12, 3 November 2011 (UTC)
:: I only linked there for the problem description, not their solutions. C2.com isn't exactly known for its example code qualities. I couldn't find a good ref to the problem anywhere else, and Dijkstra's original is in a 200+ page pdf that requires subscription to download. If you think this task description is clear enough, feel free to remove the link. --[[User:Ledrug|Ledrug]] 20:46, 3 November 2011 (UTC)

Revision as of 20:46, 3 November 2011

Explanations

Obviously, this task is not about text processing. Rather, it's about conditional code execution order. The even words are straightforward, while reversing odd words are easy with, say, recursion, with the catch that the word end marker (punctuation) needs to be processed after the recursion has returned. If peeking ahead is allowed, then this difficulty is removed and the whole thing becomes quite moot. --Ledrug 20:06, 3 November 2011 (UTC)

So this is a modified version of the problem that has been linked to? The solutions there seem to use buffers and peeking a lot. The site also says that the words will be a maximum of 20 characters long. Unless I'm missing changes in the spec later in the discussion, maybe there should be no link at all to that site (just to avoid confusion). --Mwn3d 20:12, 3 November 2011 (UTC)
I only linked there for the problem description, not their solutions. C2.com isn't exactly known for its example code qualities. I couldn't find a good ref to the problem anywhere else, and Dijkstra's original is in a 200+ page pdf that requires subscription to download. If you think this task description is clear enough, feel free to remove the link. --Ledrug 20:46, 3 November 2011 (UTC)