Help! I have a question where I need to analyze the Big-O of an algorithm or some code.
I am unsure exactly what Big-O is or how it relates to Big-Theta or other means of analyzing an algorithm's complexity.
I am unsure whether Big-O refers to the time to run the code, or the amount of memory it takes (space/time tradeoffs).
I have Computer Science homework where I need to take some loops, perhaps a recursive algorithm, and come up with the Big-O for it.
I am working on a program where I have a choice between two data structures or algorithms with a known Big-O, and am unsure which one to choose.
How do I understand how to calculate and apply Big-O to my program, homework, or general knowledge of Computer Science?
Note: this question is a canonical dupe target for other Big-O questions as determined by the community. It is intentionally broad to be able to contain a large amount of useful information for many Big-O questions. Please do not use the fact that it is this broad as an indication that similar questions are acceptable.