problem 10 solution - falling back to arrays - blazingly fast