Talk:Determine if a string is collapsible: Difference between revisions

Line 10:
 
# The collapsibility '''test''' foregrounded by the ''Determine if ...'' title needs to be included (prominently and thoroughly) in the task requirements.
# The test predicate and the repetition pruning (unmentioned in the title, but perfectly reasonable) need to be '''separately''' tested, as they are quite different coding exercises. A predicate test can exit quickly – as soon as a single consecutive repetition is detected, whereas a string rewrite (repetition pruning, in this case) has to continue all the way to the end in search of further repetitions.
# The task lacks any stretch element. An obvious possibility is to require the testing and (separately) compression of very long strings (brought in from file or computationally defined), which are beyond the scope (for some languages) of the obvious '''recursive''' solutions to these two coding tasks (the early-exit testing identified by the task title, and the quite different long-haul pruning which dominates the test strings).
 
9,655

edits