News for hackers. Stuff that matters.
Re:Big-O Algorithm Complexity Cheat Sheet by Retric on Saturday May 04, 2013 @09:37PM (#5657081)
True enough. The idea for Big-O notation is really cost = O(whatever) * (algorithms constant difficulty factor) + (algorithms overhead). My point is if you start adding difficulty factors then the same terms often wind up in your other algorithms. Granted string comparisons are generally O(log k) and pure Radix would end up as O(k) but you can also short circuit a MSD Radix sort if the buckets are small enough which effectively drops things back to O(log k) assuming sparse inputs. (if it's not sparse your not going to be doing anything past a depth of about 4 anyway.)

There are no comments on this comment yet.