A Gentle Introduction to Big-O notations
Big-O Notation
Section 1: What is it?
Big-O Notation helps us talk about the time taken by an algorithm to run given a particular input size.
Section 2: Why do we need it?
Imagine there are multiple solutions to a single problem but with different approaches/data structure, how do you know which one is better? Do you choose the solution that was the easiest to code or the solution you wrote and not the one your colleague did. Do we run both of them and decided by what is finished quicker? But what if one of the solutions is in a low-level/faster language than the other??