complexity theory - Example of a factorial time algorithm O( n! ) -


i'm studying time complexity in school , our main focus seems on polynomial time <code>o(n^c)</code> algorithms , quasi-linear time <code>o(nlog(n))</code> algorithms occasional exponential time <code>o(c^n)</code> algorithm example of run-time perspective. however, dealing larger time complexities never covered.

i see example problem algorithmic solution runs in factorial time <code>o(n!)</code>. algorithm may naive approach solve problem cannot artificially bloated run in factorial time.

extra street-cred if factorial time algorithm best known algorithm solve problem.

generate permutations of list

you have n! lists, cannot achieve better efficiency o(n!).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -