thank you for helping me out here. i am not sure why this is giving me so much trouble.
next() is supposed to return 3 different one-dimensional arrays. one containing the rows, one containing the columns, and one containing the sub-boxes of the puzzle (which i have yet to try tackling). though, currently, it only seems to return an array for the rows.
i feel pretty lost here. I understand what you are saying, and...
User Profile
Collapse
-
after i posted that last msg, i realized the problem within my isSolution and fixed it (needed to call myPuzzle[i].getValue(), etc, to get numerical values of the cells). But i am having a difficult time understanding the Iterator and how to get it to loop through the columns. my code to iterate over the rows seems to be correct. i've tried reading more about iterators, but am still just not sure how to get it to iterate over only the columns.Leave a comment:
-
re: checking array for duplicates
ok, i insterted println statements inside the nested loop. now i am thinking the problem may lie in my code for iteration b/c whats printing is :
"Cell@165e5 5e
Cell@139491b
Cell@165e55e
Cell@1f04ea6" and so on.... not the actual value.
so far, my next() method only has code to iterate through the rows and columns of the puzzle....Leave a comment:
-
checking array for duplicates
Hi all,
I've been stuck on this for hours so am brining it here to see if i can get any suggestions..
I have an array that i need to check to see if there are any duplicate values present. I do not need to remove the duplicates, just see if any are present. If there are duplicates, the method should return false; if there are no duplicates, the method should return true. My method keeps returning true. My code is below....
No activity results to display
Show More
Leave a comment: