newb: comapring two strings

Paul Rubin http
Fri May 19 14:24:35 EDT 2006


bearophileHUGS at lycos.com writes:
> > I have suggested C because if the words are all of the same length then
> > you have 30000^2 = 90 000 000 000 pairs to test.
> 
> Sorry, you have (n*(n-1))/2  pairs to test (~ 45 000 000 000).

Still terrible.  Use a better algorithm!



More information about the Python-list mailing list