Fixed memory out-of-bounds error.
Finished problem 11.