this post was submitted on 19 Dec 2024
123 points (100.0% liked)

xkcd

8975 readers
6 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 2 years ago
MODERATORS
 

The best case is O(n), and the worst case is that someone checks why.

https://explainxkcd.com/3026/

you are viewing a single comment's thread
view the rest of the comments
[–] Gustephan 5 points 2 days ago (1 children)

You should know better too! Behaviour at large n is irrelevant to "best case" complexity analysis of sorting algorithms

[–] [email protected] 2 points 1 day ago

Of course it still matters, you just take the best case for n as n→∞, instead of the worst or average case.