I initially thought that I should use my data structure from part one to solve part 2, but while figuring it out I realized that a different structure was much more effective. I like to make my functions for the first and second parts independent anyway, so it didn’t bother me to do it again. And it came out much smaller!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.