https://9dok.org/document/zlge691g-complexity-of-algorithms.html