Compare ArrayList

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<P>Hello,</P>
<P>I have 2 sorted array lists.</P>
<P>e.g. arrayList1 = a,b,c,d,e,f,h,k,l and arrayList2 = a,c,d,f,g,h,i,j</P>
<P>ArrayList1 contains the list of strings that are to be compared against. Unfortunately there are thousands of strings in each. So I dont know if it would be any good doing something like; does arrayList[0] == arrayList[0]||arrayList[1]||.... (in a loop of course).</P>
<P>Another thing, arrayList2 is getting its (distinct) data from a database so I cant really check it against arrayList1 there and then, as it would leave the connection open for longer... I dont know maybe this is an ok trade off??</P>
<P>I dont suppose there is an efficient arrayList1.compare(arrayList2) method out there? Or some other alternative.</P>
<P>Thanks.</P>

View the full article
 
Back
Top