Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   comparing elements in 2 dimensional array using java (http://www.go4expert.com/forums/comparing-elements-2-dimensional-array-t21725/)

Arthanarisamy 10Apr2010 14:44

comparing elements in 2 dimensional array using java
 
Hi,

I have 2 dimensional array and i should compare the elements with one another and add it into an another array!!!!!!!


The array i am using is

a x a p m

m m m m c

c p d y a


I should compare this array elements.


I tried comparing column by column but i am getting the solution.

Can some one help me with this?

virxen 10Apr2010 20:36

Re: comparing elements in 2 dimensional array using java
 
give a simple but complete example

array 1 is array 2 is result array is
======== ======== ========
.............. .............. ..............
.............. .............. ..............
.............. .............. ..............

Arthanarisamy 12Apr2010 10:02

Re: comparing elements in 2 dimensional array using java
 
Hey thanks for your reply!!!!!!!!1




The array i am using is ( 3*5)

a x a p m

m m m m c

c p d y a


The comparison should go this way,

I should take column 1 and should compare with other columns regardless of the order!!!!

If its same then i should cluster column1 and the other columns which are same as column 1 into another array(Clustering).

If its not same then column1 will be a separate array!!!!!

Similarly i should compare the other columns!!!!!!!!!!!!!!!

virxen 13Apr2010 00:20

Re: comparing elements in 2 dimensional array using java
 
do the comparison you want with words for the array you want
and tell what is the result you want to have at the end.Step by step.
Because it is not easy for me to understand exactly what you want.


All times are GMT +5.5. The time now is 05:40.