Changed my approach to problem 18. Now attempting to use jagged arrays.