this post was submitted on 24 Apr 2024
61 points (98.4% liked)
Programmer Humor
19813 readers
526 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
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
There are subfields of computer science dedicated to this question. A good starting point for the theory would be Pessimal algorithms and simplexity analysis, which lays out two concepts:
For example, common folklore is that sorting has
O(n lg n)
time complexity, depending on assumptions. In the paper, they give that sorting hasΩ(n ** (lg n / 2))
time simplexity; any algorithm which takes more time, like bogosort, must do so through some sort of trickery like non-determinism or wasting time via do-nothing operations.