Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the exclamation mark mean in big-o, i.e. O(X!)? [duplicate]

I've seen examples of big-o expressed as O(X!) but I am not sure what this means, according to the accompanying charts it is very slow.

Can someone give an example of an O(X!) algorithm?

Thanks

like image 235
antfx Avatar asked Oct 17 '25 16:10

antfx


1 Answers

It means factorial. It is the product of the numbers from 1 to X. So by example, 5! = 1 * 2 * 3 * 4 * 5 = 120.

like image 130
nouney Avatar answered Oct 19 '25 13:10

nouney