From 4d32dfbd7a1c0a21d7dac0830cb6fe4a721b1c55 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Mon, 11 Nov 2024 18:56:28 -0800 Subject: [PATCH] :memo: More notes --- big_o_cheatsheet.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/big_o_cheatsheet.md b/big_o_cheatsheet.md index 7516b6eb..ec79a19b 100644 --- a/big_o_cheatsheet.md +++ b/big_o_cheatsheet.md @@ -275,3 +275,29 @@ Note here, that now, the `for` loop executes regardless of the `if (n < 5)` condition. Thusly the best and worst case scenario become the same: $$ O(n) $$ + +## Types of Time Functions + +**Constant:** + +$$ O(1) $$ + +**Logirithmic:** + +$$ O(log(n)) $$ + +**Linear:** + +$$ O(n) $$ + +**Quadratic:** + +$$ O(n^2) $$ + +**Cubic:** + +$$ O(n^3) $$ + +**Exponential:** + +$$ O(2^n) $$