How to estimate the complexity of sequential algorithm given that we know the complexity of each step?
In the first case, we have $O(n^9)+O(n^9)$ and according to it's summation properties we have $O(n^9)+O(n^9)=O(2n^9)=O(n^9)$.
For the second case, both $n^2$ and $n^3$ are smaller than $n^9$, so we have $O(n^2)+O(n^3)+O(n^9)=O(n^2+n^3+n^9)&lt;O(n^9+n^9+n^9)=O(3n^9)=O(n^9)$
In the general case, if we have time complexities $t_1,t_2,...,t_k$, then $O(t_1)+...+O(t_k)=O(max\{t_1,...,t_k\})$