Quote:
Originally Posted by Inverness
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...