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
O(n!)
n
See the Orders of common functions section of the Big O Wikipedia article.
According to the article, solving the traveling salesman problem via brute-force search and finding the determinant with expansion by minors are both O(n!).