Calculate running time of an algorithm

https://www.competitive-programming.com/2020/04/calculate-running-time-of-algorithm.html