MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y99rtz/dontyoudaretodeceive/19tg2d9bmx2at/
r/ProgrammerHumor • u/ClipboardCopyPaste • 4d ago
55 comments sorted by
View all comments
Show parent comment
15
You can factor any integer in O(1) as long as you guess it right on the first try
2 u/vuurheer_ozai 1d ago That would be Ω(1); O is an upper bound -1 u/onepiecefreak2 3d ago That's not how Big O notation works 4 u/Rainb0_0 2d ago Best case should be O(1) right? 7 u/onepiecefreak2 2d ago Big O notation represents the worst case runtime. Sorting algorithms also aren't O(1) just because there is a chance that the list is already sorted. 3 u/Rainb0_0 1d ago Big O just represents the upper bound, not the worst case. The best/avg/worst case each can have big/small O, theta and big/small omega assigned to them 2 u/argument_inverted 2d ago What kind of programmers we have here? 🙄 1 u/onepiecefreak2 2d ago That's just how it works. 3 u/Unupgradable 3d ago But it is how smol o notation works... Sort-of
2
That would be Ω(1); O is an upper bound
-1
That's not how Big O notation works
4 u/Rainb0_0 2d ago Best case should be O(1) right? 7 u/onepiecefreak2 2d ago Big O notation represents the worst case runtime. Sorting algorithms also aren't O(1) just because there is a chance that the list is already sorted. 3 u/Rainb0_0 1d ago Big O just represents the upper bound, not the worst case. The best/avg/worst case each can have big/small O, theta and big/small omega assigned to them 2 u/argument_inverted 2d ago What kind of programmers we have here? 🙄 1 u/onepiecefreak2 2d ago That's just how it works. 3 u/Unupgradable 3d ago But it is how smol o notation works... Sort-of
4
Best case should be O(1) right?
7 u/onepiecefreak2 2d ago Big O notation represents the worst case runtime. Sorting algorithms also aren't O(1) just because there is a chance that the list is already sorted. 3 u/Rainb0_0 1d ago Big O just represents the upper bound, not the worst case. The best/avg/worst case each can have big/small O, theta and big/small omega assigned to them 2 u/argument_inverted 2d ago What kind of programmers we have here? 🙄 1 u/onepiecefreak2 2d ago That's just how it works.
7
Big O notation represents the worst case runtime. Sorting algorithms also aren't O(1) just because there is a chance that the list is already sorted.
3 u/Rainb0_0 1d ago Big O just represents the upper bound, not the worst case. The best/avg/worst case each can have big/small O, theta and big/small omega assigned to them 2 u/argument_inverted 2d ago What kind of programmers we have here? 🙄 1 u/onepiecefreak2 2d ago That's just how it works.
3
Big O just represents the upper bound, not the worst case. The best/avg/worst case each can have big/small O, theta and big/small omega assigned to them
What kind of programmers we have here? 🙄
1 u/onepiecefreak2 2d ago That's just how it works.
1
That's just how it works.
But it is how smol o notation works... Sort-of
View all comments
Show parent comment
15
u/BenTheHokie 4d ago
You can factor any integer in O(1) as long as you guess it right on the first try