top of page

I found the use of recursion here cleverly useful.
Using a hash map as a quick way to access data at constant time

Big Takeaway
If you a reading a file from disk, its far more efficient to hold onto the line and perform x # of .contains checks verses reading the line and checking it once, then later on reading the line and checking it again.
​
So opening a file and reading each line, over and over for all things you need is a lot more efficient, than opening the file and reading the line every time you need something.
​
I was able to cut down a 8+ hour search to 12 minutes on a very large data set.

bottom of page