|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
Re: Points on a line and associated intervalsby turo (Friar) |
| on May 17, 2006 at 21:56 UTC ( [id://550136]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
i'm sleepy, but here it goes
When you finish, you will have (i think) an array of 10 elemnts (at complexity O(n)), which are the ones you are searching for (supposing, of course, that your points are consecutive between them ... umm ... i'm wondering if i really grasp the problem ... i'll go to bed) Good night
perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||