I have perceived an error in the lesson. The solution presented as correct contains the following flaw:
you are asked to update:
when in fact it should be:
the -1 is needed to correct for the indexes starting at 0 instead of 1. Otherwise, when giving input 1st row 1st column, it will update 2nd row 2nd column and 5th row gives an out of range exception.
Just a little detail i've encountered, hope it helps some people understand their errors.
great course btw.