Big-O notation in 5 minutes - The basics

<aside> 💡 Simplified analysis of an algorithm's efficiency

</aside>

types of measurement

general rules

complexity chart

Screen Shot 2021-10-05 at 6.46.42 PM.png

linear time

for x in range(0, n):
	print x; //O(1)

$N*O(1) = O(N)$

y = 5 (15*20);
for x in range(0,n):
	print x;

total time = $O(1) + O(N) = O(N)$