![]() |
|
[Java] Need Help W/ This Bit of Code Replacing Data Within a 2D Array Not Updating - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Need Help W/ This Bit of Code Replacing Data Within a 2D Array Not Updating (/showthread.php?tid=5736463) |
Need Help W/ This Bit of Code Replacing Data Within a 2D Array Not Updating - J. McCarthy - Oct 13, 2017 Okay so basically I have a 2D array of size n*n It's fully populated and I'm trying to wipe out an entire row/column for each position within 1->n that I visit. Problem is that it's getting hung up and re-visiting a position that should have been replaced with a zero after the third iteration. I don't get why in my code it's not recognizing it as a zero in the loop iteration though? Any thoughts? I'm sure it's a stupid mistake in my loop just can't find it. Code //~~~~~~~~ Start 2D Array Cost FunctionI deleted my counter reset on accident Never mind ^_^ |