Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: numeric representation of string

by Lawliet (Curate)
on Aug 16, 2013 at 11:41 UTC ( #1049730=note: print w/replies, xml ) Need Help??


in reply to Re^3: numeric representation of string
in thread numeric representation of string

If you are to do a full cross-compare of all your emails one against the other, you are looking at an O(N2) (or O(N!) if you're smart about it) process.

Did you forget a word? I'd be interested to see the case where the smart algorithm is O(N!), and the naive one is O(N2).

Replies are listed 'Best First'.
Re^5: numeric representation of string
by BrowserUk (Pope) on Aug 16, 2013 at 12:07 UTC

    You're right of course. Too early in the morning and mixing up n + n-1 + n-2 ... with n * n-1 * n-2 ....

    It should be O((N-1)*N/2). Corrected. Thanks.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1049730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2019-05-22 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (140 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!