From 9891f38ddcca971fa21ab61e7a70832c8c877b0a Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Sat, 23 Sep 2023 12:53:46 -0500 Subject: Initial commit --- complexity.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 complexity.md (limited to 'complexity.md') diff --git a/complexity.md b/complexity.md new file mode 100644 index 0000000..9327bb4 --- /dev/null +++ b/complexity.md @@ -0,0 +1,14 @@ +# Time Complexity + +## Big O + +Big O is a way to categorize an algorithm's time or memory requirements based on +input. It is not meant to be an exact measurement. It will not tell you how many +CPU cycles it takes, instead it is meant to generalize the growth of the +algorithm as the input grows. + +- Look for loops +- Constants are dropped (Big O describes the upper bound or growth of the + algorithm where the constant eventually becomes irrelevant) +- We often only consider worst case (e.g., searching through a list where the + element you want is the last one) -- cgit v1.2.3