Original Post
I am having trouble determining the O-notation of an algorithm or piece of code. I can find examples of constant time O(1), linear time O(n), and quadratic time O(n^2), but I cannot find examples of the others.
What are the rules for constant, linear, and quadratic time, in your own words, for clarification? And primarily... how do you determine logrithmic times O(log n), or O(n log n), how do you determine exponential O(x^n), and how do you determine factorial O(n!). Are there any others? What are the signs you are looking for, and what are the general rules in picking the order for a given code block?
Also, could someone explaint the difference between little-o and big-o, and theta? Are there others? What does the phrase asymptotically bound mean in terms of these?
I''ve checked every site that I can find on google, so layman descriptions are preferred, unless you think you know of the mother-of-all sites for o-notation that I probably would not have seen (first page of google or so).
Thanks for any help.