View Single Post
  #23  
Old 03-27-2008, 02:04 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Inverness View Post
Well, after having this explained to me I'm kinda ticked that this wasn't even pointed out from the start.
This has always been the point of the Programming Exercises. Perhaps you need to think differently to solve this problem by better methods, rather than the obvious...

@Chris, you started your algorithm 355 years into the future? Also you fail at subtracting.

e: Here are exact (well, kinda) loop count functions for the algorithms (n=str.length()):
Inverness:
Where epsilon (the E) is a number representative of the other loops that lead to 'continue;'. The script could be adjusted slightly to eliminate this term.
DrakilorP2P:
It should be pretty obvious where I get the O(n^2) from...
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/

Last edited by Tolnaftate2004; 03-27-2008 at 06:26 AM..
Reply With Quote