Reading 1
Pain and Suffering
Suffering is pain without purpose.
What will become possibly one of the most important and relevant reads of my Code Fellows career, this article pulls into focus the reason I am pursuing this path and the cost that comes with it. I’ve felt it already in 201 and 301, but I need to be reminded that this will be a difficult journey, but for a good cause. Growth is often painful, and this course is no exception.
Introduction to Big O Notation
What is Big O Notation?
Big O notation is used to denote the complexity of an algorithm, either based on the time it takes to execute or the amount of space it takes up.
- O(1) - will always execute in the same time or space regardless of input
- O(N) - the i(N)put (see what I did there?) determines the time/complexity of the algorithm linearly so the bigger N is, the longer the execution of code will be, proportionately.
- O(N^2) - the square of the input size is proportional to performance. Nested for loops are great examples.
for x in range(0,n): for y in range(0, n): print(x*y)
- O(2^N) - this is exponential growth in execution with each increment of N.
- O(logN) - growth spikes in the first iteration of N, but essentially plateaus.