How to calculate Big O notation from piece of code | Hacker News Reader