Extracted from book?? Now now guys ...give me some credit!! I come from C background and that's the most logical way that I can think of coding within the given constraints. Small, simple..and compact.
-----Original Message----- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: RE: union of times algorithm --- [EMAIL PROTECTED] wrote: > No. you have 11,12 as 2 when only 1. Right? > > Wags ;) Oops, yeah. I guess I made it easy for you to spot, could do something about the complexity, couldn't you? O(length of total timeframe) isn't exactly hot. I'm looking at Shishir K. Singh's algorithm (which he probably extracted from a book, the sensible thing to do ;-) Jonathan Paton ===== $_=q|.,&@$$. ,.@$&@$. .&$$@. ,,$ ....!$_=$p.'&$@.',y'&$@' ..,';for(/\S+/g){ !|.q| .$ .,@, ,$, .,.. @, ,$ ,,@ ..,,.!++$.<22?${'y'.$_}=chr$.+64:[$$=${'y' !|.q| ,@$@&.,. $$$&, ..@&&$,,, $., ...!.$_},$y.=($.=~/22\|26\|3(3\|7)/x?' ' !|.q|. @ ., ,.&,,, , .$..&. .,$ .,,!.$$:"\l$$")]};$y=~/ (.*)/;warn"$1\n" !|.q|. $ .,. .,$$&&$...&., @.,.&@$@ ..|,map{-$|--?$r:$p.=$_}split'!';eval$r __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]