this post was submitted on 19 Dec 2024
123 points (100.0% liked)
xkcd
9048 readers
142 users here now
A community for a webcomic of romance, sarcasm, math, and language.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Really annoys me that this is actually O(n log n) because for large enough n the merge sort will take longer than n*1e6 second. Randall should know better!
You should know better too! Behaviour at large n is irrelevant to "best case" complexity analysis of sorting algorithms
Of course it still matters, you just take the best case for n as n→∞, instead of the worst or average case.