Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- fuzzy problem
Re: fuzzy problem
On Tuesday, 9 February 2016 01:35:14 UTC+5:30, Rainer Weikusat wrote:
The chunks out of the for-loop are blobs of all 1s or all 0s, hence we
can use the remainder op. to distinguish the array element being modified:
perl -E 'for(pop=~/((.)*)/g)say"@l"'
here we make use of the fact that it's the first digit will really determine
the sequence of @l, like as,
here we mark the positions for 1->0 or 0-> transitions and do the computations