3 ms·
Average case is not that bad actually. Try coding it.
by amichail 17y ago
Average case is not that bad actually. Try coding it.
- nostrademons 17y agoUmm, factorial time generally means that for input sizes about 10-20, the problem essentially can't be computed in the lifetime of the known universe. Sorting 20 elements with BogoSort takes on the order of 46 quintillion operations.
- amichail 17y agoIt's less than exponential time.
- nostrademons 17y agoFactorial time is not less than exponential time, in a big-O sense. See Stirling's Approximation: http://en.wikipedia.org/wiki/Stirling%27s_approximation http://en.wikipedia.org/wiki/Stirling%27s_approximation
- amichail 17y agoThe expected running time is sub-cubic.