problem 10 slow solution
problem 10 optimized solution but does not fit within memory limits
problem 10 optimized solution finished in 10 minutes.. :/
problem 10 solution, although still slow