I'm wondering if someone could help me with my thought process on searching for duplicates in a 2d array. Hopefully I'm right, but if I'm not I'd appreciate someone helping me along on my way. I'm thinking to find a duplicate I would first set the search item to the first number in my array. I would then search for it ...
I'm importing a txt file, and then filling the 2D array with the points, all that is working fine. I can't for the life of me get it working where I can find duplicate points and then basically create a new array with only single points, no duplicates. Since they're coordinates I only want to remove a duplicate POINT, so both ...
A few questions. What happens when a duplicate is removed? Which way to you want to slide the remaining elements? By row or by column? For example given this 2x2 12 24 to 14 2 or 12 4 Can you give an example of an array with duplicates and what you want the resultant array to look like?
I want to check the first cluster of 3x3 (so the top corner of the 9x9 array) to see if any of the ints appears more than once. I have been trying to come up with an approach as to how to do this but I cannot thing of any logical way.