What is an example (in code) of a O(n!) function? It should take appropriate number of operations to run in reference to n; that is, I\'m asking a
printf("Hello World");
Yes, this is O(n!). If you think it is not, I suggest you read the definition of BigOh.
I only added this answer because of the annoying habit people have to always use BigOh irrespective of what they actually mean.
For instance, I am pretty sure the question intended to ask Theta(n!), at least cn! steps and no more than Cn! steps for some constants c, C > 0, but chose to use O(n!) instead.
Another instance: Quicksort is O(n^2) in the worst case, while technically correct (Even heapsort is O(n^2) in the worst case!), what they actually mean is Quicksort is Omega(n^2) in the worst case.