Whereagainandhe's a numberofrowsand m is a numberofCollinsmayhave.
Sohere's theoptimalsolutionincode.
We'redefiningourfunctionherewiththeMatrix, Andi, thenumberofrowsandthenumberoffcolumnsasimpetuswereinitializingcounterzero, whichwe'regoingtousetokeeptrackofthenumberofnegativenumberswe'veseensofaron I 20 whichisarerowingnecksandJayto M minusone, whichisourcolonynext.
Sowe'lluse I m j tokeepJackoffwhichelementwe'relookingat.
SowhileJay's largerthanorequaltozero, sowestillhavemore, theygotnumbersaccounton I islessthanend.
Sowehaven't gottothatlastrowyet.
Iftheelementwe'relookingatam I Jayisandthey'rethenumber, ThenwefoundthelastNagelnumberintheroad.