Re: [PHP] Finding if a number is in the range

2001-05-18 Thread MaD dUCK
also sprach Zak Greant (on Thu, 17 May 2001 11:50:35PM -0600): > Do you really need a chainsaw to cut a piece of cake? ;) hehe. depends. and come on, i simultaneously have a point and am joking... martin; (greetings from the heart of the sun.) \ echo mailto: !#^."<*>"|tr "

Re: [PHP] Finding if a number is in the range

2001-05-18 Thread MaD dUCK
also sprach Joseph Blythe (on Fri, 18 May 2001 02:29:40PM +0930): > I give these ideas a go unfortunately the ranges are not contiguous, > they are all over the place. so you make new ranges to fill spaces and associate a bool with each... or you check them linearly... martin; (gre

Re: [PHP] Finding if a number is in the range

2001-05-18 Thread Christian Reiniger
On Friday 18 May 2001 06:16, MaD dUCK wrote: > also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600): > > Or just use a simple chain of if statements :) > > yeah, but that's so O(n) ! > i can do in O(lg n) > or, given n CREW processors, in O(1) time! > > yes, i have just finished my comput

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Zak Greant
MaD dUCK wrote: > also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600): > > Or just use a simple chain of if statements :) > > yeah, but that's so O(n) ! > i can do in O(lg n) > or, given n CREW processors, in O(1) time! > > yes, i have just finished my computational theory and computer

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Joseph Blythe
MaD dUCK wrote: > also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600): > >> Or just use a simple chain of if statements :) > > > yeah, but that's so O(n) ! > i can do in O(lg n) > or, given n CREW processors, in O(1) time! > > yes, i have just finished my computational theory and c

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread MaD dUCK
also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600): > Or just use a simple chain of if statements :) yeah, but that's so O(n) ! i can do in O(lg n) or, given n CREW processors, in O(1) time! yes, i have just finished my computational theory and computer algorithms honors exam. martin

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Zak Greant
every second set of .. to $bounds = ereg_replace ('([^.]+\.\.[^.]+)\.\.', '\1', $bounds); echo "Number $number not found with any of the specified ranges:$bounds"; } --zak - Original Message ----- From: "MaD dUCK" <[EMAIL P

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread MaD dUCK
also sprach Joseph Blythe (on Fri, 18 May 2001 11:12:23AM +0930): > How do I find if a number is in a range example: assuming that the ranges are continuous, make an array of the first number for each range and then implement a custom binary search for O(lg n) performance. martin; (