Originally Posted by
raj reddy
how to compare the elements of the two arraylists al1,al2
Let's say we have the following two lists:
al1=[10, 20, 30, 40]
al2=[11, 12, 13, 14, 15,16,17,18,19,20]
(i)we have to compare the first 4 elements of al1 to first 5 elements of al2 10/11,10/12,10/13,10/14,10/15,11,11,11/12,11/13,11/14,11/15,10/11,10/12,10/13,10/14,10/15......................like that all the elements
(ii) and then the same 5 elements of al1 and the next 5 elements of al2
10/16,10/17,10/18,10/19,10/20,11/16,11/17,11/18,11/19,11/20................................................ ..............like
that all the elements
so that we have to compare every element in the first array list, to every five elements at atime in the second arraylist?