What is time complexity of following code | Hacker News Reader