Funny thing I wrote during Coursera algorithms course. Supposed to be capable of estimating complexity of the algorithm.