Assignment sort of complete

I have read that there are faster ways to do this based on the data in
the matrix, but this is my first best guess.