Rasoul Hajikhani wrote at Fri, 07 Jun 2002 21:49:41 +0200:

> Here's an example:
> 
> input: 1,2,3,4,5,6,17-25,32-101:4
> output:
> 1 6 1
> 17 25 1
> 32 100 4
> 
> output is "start end increment"
> 
> 
> also, frames can be duplicated:
> 
> input: 1,2,3,4,5,6,17-25,32-101:4,1,2,3,5
> output:
> 1 6 1
> 17 25 1
> 32 100 4
> 1 3 1
> 5 5 1
> 

It's sure an interesting algorithmic problem.
But I feel very nervous, because I don't know what is the excact output.

I'll give some examples where I'm not sure what you'll expect:
(to reduce lines I use a | as a line seperator)

input: 1,3,5,7,9
output1: 1 1 1  |  3 3 1  |  7 7 1  |  9 9 1
output2: 1-9:2

input: 1, 3, 6, 8
output1: 1 1 1  |  3 3 1  |  6 6 1  |  8 8 1
output2: 1 3 2  |  6 8 2

input: 1-3,4-9
output1: 1 3 1  |  4 9 1
output2: 1 9 1

input: 32-100:4,104:112:4
output1: 32 100 4  |  104 112 4
output2: 32 112 4

input: 1,2,3,4-5
output1: 1 5 1
output2: 1 3 1  |  4 5 1

input: 32-103
output1: 32 100:4
output2: 32 101:4

Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to