Measure execution time
- Needs to run the program
- Dependent on hardware, programming language, other running processes…
Something more abstract: complexity
- Number of operations as a function of the input size $n$
- We use the $O(\cdot)$ notation, e.g., $O(n)$, $O(n^2)$, $O(n!)$
$\rightarrow$ Independent of hardware, programming language…
$\rightarrow$ Does not need the program to be run
- Examples – DFS/DFS: $O(|E|)$ ; Dijkstra: $O(|E| + |V| \cdot log(|V|))$