Non-continuous subsequences: Difference between revisions

m
added whitespace, used a vertical list instead of a horizontal list (for the named example list).
m (→‎{{header|REXX}}: added/changed whitespace and comments, changed indentations, made other cosmetic improvements.)
m (added whitespace, used a vertical list instead of a horizontal list (for the named example list).)
Line 9:
So a sequence ''a,b,c,d'' will always have the same subsequences and continuous subsequences, no matter which values are substituted; it may even be the same value.
 
'''Task''': Find all non-continuous subsequences for a given sequence. Example: For the sequence ''1,2,3,4'', there are five non-continuous subsequences, namely ''1,3''; ''1,4''; ''2,4''; ''1,3,4'' and ''1,2,4''.
 
Example: For the sequence   ''1,2,3,4'',   there are five non-continuous subsequences, namely:
::::*   ''1,3''
::::*   ''1,4''
::::*   ''2,4''
::::*   ''1,3,4''
::::*   ''1,2,4''
 
'''Goal''': There are different ways to calculate those subsequences. Demonstrate algorithm(s) that are natural for the language.