Talk:Multisplit: Difference between revisions

no edit summary
(Rewrote task description; explanation)
No edit summary
Line 14:
<nowiki>Input: 'X123Y', ['1', '12', '123', '23', '3']
Output: ['X', [0, 1], '', [3, 2], 'Y']</nowiki>
It is acceptable to output this information in data structures native to programming language. --[[User:DSblizzard|DSblizzard]]
:'a' is at an odd position according to the output, but it's a string. And that still doesn't explain where "<nowiki>''</nowiki>" came from. --[[User:Mwn3d|Mwn3d]] 03:07, 28 February 2011 (UTC)
::odd - if we will count from 1, OK. This format with empty strings allows us to quickly answer, what is the 1548-th separator in a string, without looking over first 1547 separators. Another format which allows to answer such question will be more complicated. --[[User:DSblizzard|DSblizzard]]
 
I've reworded the task so that it actually describes the task rather than referring to an implementation. I'm also trying to avoid having it state that the strings and separator information have to be interleaved; that's a very odd thing to do in some languages. My aim was that the solutions given should continue to be solutions, but that the description won't stop other ways of doing the challenge; after all, we ''want'' solutions to tasks to be as idiomatic as possible in their language. –[[User:Dkf|Donal Fellows]] 10:31, 28 February 2011 (UTC)