Results 1 to 6 of 6
Thread: Remove duplicates in 2D array
- 07-22-2011, 07:51 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 24
- Rep Power
- 0
- 07-22-2011, 08:02 PM #2
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?
- 07-22-2011, 08:13 PM #3
Member
- Join Date
- Jun 2011
- Posts
- 24
- Rep Power
- 0
I want to use hashset to remove duplicates becoz lines of code is less. I have a 2D array with all the duplicates. Now, I want to remove the duplicates and store the remaining elements into array. Here is the example, and my final array should be 1456,1457,1458,1459 in an array.
0 1
0 1458 1457
1 1457 1459
2 1456 1458
- 07-22-2011, 08:16 PM #4
Can you edit your example and show the before and after arrays?
This looks like a one dim array?my final array should be 1456,1457,1458,1459 in an array.
- 07-22-2011, 08:43 PM #5
Member
- Join Date
- Jun 2011
- Posts
- 24
- Rep Power
- 0
Here is the example according to array index. My final output should be 1458,1459,1456,1457 in 1D array.
0 1
0 1458 1457
1 1457 1459
2 1456 1458
- 07-22-2011, 08:49 PM #6
Similar Threads
-
How can i remove a value from an array?
By Meta in forum New To JavaReplies: 3Last Post: 01-30-2011, 09:31 PM -
Getting rid of duplicates in my Array problem
By 'Rasta. in forum New To JavaReplies: 6Last Post: 11-20-2010, 05:51 PM -
Duplicates in String Array
By turnergirl24 in forum New To JavaReplies: 1Last Post: 11-04-2009, 11:09 PM -
FInd the no. of duplicates in an array
By singularity in forum Advanced JavaReplies: 3Last Post: 09-04-2009, 09:25 AM -
how to remove an object from the array list
By cecily in forum New To JavaReplies: 3Last Post: 08-02-2007, 02:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks