The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

AOTM (Algorithm of the Moment) by jmaxsohmer2006-09-25 19:03:48
  Interestingly, there's already an algorithm to by Arachnid2006-09-25 19:40:03
    Its not linear per se... by imperito2006-09-25 19:44:08
      O(n * k), actually by Arachnid2006-09-25 19:49:43
        you are imposing artificial constraints, though by imperito2006-09-25 19:52:22
          It's not n log n by Arachnid 2006-09-25 19:55:48
Because the length of an item does not depend on the number of items to be sorted. The two are independent variables. In general, it's O(n * m). However, m is generally ignored because for any given task, it's general.

If we didn't ignore variables that are generally constant for a given case, O() notation would get excessively krufty. For example, the speed of all sorts is also proportional to the average length of identical prefixes for a pair of input strings - eg, how much has to be compared before finding a mismatch, on average. That's not included in big-O notation because it's generally constant for any one situation.
[ Reply ]
            but it isn't constant. by imperito2006-09-25 19:57:47
              No, it's not! by Arachnid2006-09-25 20:00:27
                and what if you are sorting 10 000 000 000 of them by imperito2006-09-25 20:03:52
                  It doesn't matter. by Arachnid2006-09-25 20:09:35

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)