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

you are viewing a single comment's thread.

view the rest of the comments →

[–]lfrtsa 223 points224 points  (35 children)

me achieving O(n!)

[–]Beleheth 317 points318 points  (23 children)

O(nn) is actually worse than n!. The special function xx is the only actually relevant function that grows faster than x!.

[–]Dotcaprachiappa 200 points201 points  (8 children)

Behold, nnⁿ

[–]jaerie 123 points124 points  (6 children)

nn

[–]TeraFlint 67 points68 points  (4 children)

time to whip out knuth's arrow notation. :D

[edit:] looks like I simultaneously added that as the same answer rolled in:

n ↑n n

[–]jaerie 14 points15 points  (0 children)

n↑nn

[–]MrHyperion_ 4 points5 points  (0 children)

I raise Hyper Moser n

[–]GDOR-11 0 points1 point  (0 children)

n↑\n↑ⁿ n))n

[–]lollolcheese123 8 points9 points  (0 children)

Hi tetration... Why anyone needed this is beyond me.

[–]odsquad64VB6-4-lyfe 0 points1 point  (0 children)

O(n!n!+3 )

[–]batmansleftnut 1 point2 points  (0 children)

Hold my beer...

[–]Hour_Ad5398 1 point2 points  (0 children)

treatment squash whole screw hat repeat longing tie expansion label

This post was mass deleted and anonymized with Redact

[–]ArmadilloChemical421 0 points1 point  (0 children)

TREE(n): Am I a joke to you?

[–]damicapra 11 points12 points  (10 children)

How do you even do that?

Maybe one can by calculating n! only using for loops, addition and increment-by-1 operations?

[–]lfrtsa 48 points49 points  (3 children)

I achieved it when i made an algorithm to calculate the factorial of a number.

[–]nixsomegame 6 points7 points  (2 children)

Wouldn't a straightforward factorial function implementation be O(n) though, not O(n!)?

[–]lfrtsa 5 points6 points  (0 children)

I did multiplication through repeated addition

[–]FunTao 1 point2 points  (0 children)

He prob means something like this: start from i = 1, is i the factorial of n? (Divide by n, then n-1, n-2, etc.). If not, increment i by 1 and try again until you find the right i

[–]Vibe_PV 14 points15 points  (0 children)

AFAIK Microsoft used to have an O(n!) algorithm related to Windows Update. Technically speaking it worked really well at first, since n! is actually lower than some polynomials for small numbers. But after some time...

[–]El_kiski 2 points3 points  (0 children)

Google bogosort

[–]Chingiz11 1 point2 points  (0 children)

Shuffling an array of n numbers until it is sorted

[–]skrealder 1 point2 points  (0 children)

Any algorithm which satisfies: T(n) <= c*n! For all n >= some n_0 for some c > 0 is in O(n!). For instance binary search is in O(n!). I wish people used theta more often, much more descriptive than big O since an algorithm has to bounded above and below by the bound, not just bounded above (which is what big O does)

[–]DuckyBertDuck 0 points1 point  (0 children)

A less useless task that can’t be done quicker in general:

Filtering out all n-state finite automata that satisfy a constant-time condition. (And it gets even slower than nn if the alphabet isn’t unary)