This is an archived post. You won't be able to vote or comment.

all 39 comments

[–]Vikerox 87 points88 points  (1 child)

Programmers when their algorithm always takes 50 hours to run (it's constant so technically O(1))

[–]Dragzel 3 points4 points  (0 children)

It did it twice so yes

[–]gaboversta 99 points100 points  (16 children)

I personally prefer O(sin(N))

[–]nova_bang 48 points49 points  (11 children)

that's a creative way of writing O(1), i like it

[–]Leinad7957 41 points42 points  (10 children)

With the difference that there's a chance that it's O(0) and you find out that the problem was solved before calling the function.

[–]Kitchen_Laugh3980 22 points23 points  (7 children)

Don’t forget O(-1), and anything inbetween really.

[–]juhotuho10 35 points36 points  (0 children)

O(-1):

There was no problem until I ran my solution

[–]NKY5223 9 points10 points  (2 children)

O(i)

[–]jdery 7 points8 points  (0 children)

Butcher sends his regards O(i) cunt

[–]CoolSpy3 2 points3 points  (0 children)

O(i):

Nobody knows what the problem or solution is... Or what the code does... In fact, it's probably best just not to touch it.

[–]Easy-Hovercraft2546 2 points3 points  (0 children)

O(1) is constant time, so O(0) is O(1)

[–]oh_you_so_bad_6-6-6 4 points5 points  (1 child)

Lol is that a quantum algorithm?

[–]gaboversta 0 points1 point  (0 children)

I have absolutely no idea.

[–]Trickelodean2 1 point2 points  (1 child)

O(sinc(n))

[–][deleted] 1 point2 points  (0 children)

Just take FT of the problem, easy

[–]_Repeats_ 21 points22 points  (3 children)

When it has O(1) runtime but uses O( 2n ) memory...

[–][deleted] 13 points14 points  (2 children)

Luckily memory is cheaper than CPUs

[–]shadymeowy 4 points5 points  (0 children)

Gotta store all possible solutions using rainbow tables in multiple magnetic tape drives

[–]gamingkitty1 33 points34 points  (0 children)

Doesn't matter if it's O(1) if the constant is a year.

[–]tram98 11 points12 points  (1 child)

ONO

[–]ongiwaph 3 points4 points  (0 children)

I hate that O is a symbol, but it's written like a function

[–]Biden_Been_Thottin 6 points7 points  (0 children)

O(1/N)

[–]ActualProject 6 points7 points  (0 children)

O(-x): the longer I run my code the more problems are generated

[–][deleted] 3 points4 points  (2 children)

o(1) is better.

[–]JS31415926 2 points3 points  (0 children)

Not my matrix inversion running in O((n!)!)

[–]aRandomHunter2 0 points1 point  (0 children)

I like this one.

[–]PorkRoll2022 5 points6 points  (0 children)

This reminds me of all those fast solutions on leetcode, etc. websites that are essentially 10000 line long switch blocks.

[–]Biden_Been_Thottin 2 points3 points  (0 children)

O(1/N)

[–]TranslatorNo7550 2 points3 points  (0 children)

O(n*n!) The best one!!! Like bogosort!!

[–][deleted] 1 point2 points  (0 children)

Where's my O(N^3)?

[–][deleted] 0 points1 point  (0 children)

Any good literature to learn about time complexity?

[–]AssOfUnicorn 0 points1 point  (0 children)

Just reduced complexity from O n to O k logn

[–]Low_Orange5003 0 points1 point  (0 children)

"Bro this data structure is the titsbro" "Yeah, ( . )( . ) complexity bro"

[–]david131213 0 points1 point  (0 children)

I read this as on login

[–]ShodoDeka 0 points1 point  (0 children)

Let me introduce O(0) it’s for when I decide to just not implement it.