Archive for October, 2017

Prevent Stack Overflow in Recursion

In the previous part we solved a problem using recursion. In this solution a method keeps calling itself. When a method calls a method, it has some administrative cost, it needs memory. For example, the CPU needs to know where to continue the execution of the program code after it returns from a method, so […]

Leave a comment

Tech Interview – Recursive Tree Traversal

One of the improvements we need to make on the Like Statistic application is to change the structure of the database where the datafiles are stored. The database is a directory with datafiles, and the program reads all datafiles from that given directory from a single level, but doesn’t read those from the subdirectories. In […]

Leave a comment