Archive for November, 2017
Tech Interview – Improve the Algorithm
Posted by Viktor Peller in .NET, Algorithms, Interview on November 11, 2017
Adding new files to our database increases the processing time significantly. This is because the algorithm we use is not efficient. Let’s recap how it works. After we read the database in, we have a list of Person instances, and every Person instance maintains a list that tells which other people this person likes: If […]
Tech Interview – Non-recursive Tree Traversal
Posted by Viktor Peller in .NET, Algorithms, Design Patterns, Interview, Refactor on November 4, 2017
In the previous part we extended the database structure and now it supports sub-directories. The algorithm that walks through the directory structure is based on recursive calls. Many times recursion results a nice program structure, but it also has its drawbacks. What if we want to process the data – like files from a directory […]
Recent Comments