I hava to compare two Or more Set like List'<'Integer'>' l1,List l2,List l3 ...,But How to compare them ?
In my view,first Collections.sort(list),then l1.euqals(l2),and so on... But it seems not the effective way,It cost about O(n^2), and that there are not Two List,It may be three or four or more...
And Anthoer Way is useing extra enough max Array A init Zero,first A[l1.get(i)] fill with A number Not-Zero,then A[l2.get(i)] fill with Zero, at last,if the Array A still full with Zero ,the two list are equal. And it cost O(n),but the trouble thing is not only two List...
Is there any fast and efficient way which only cost less on time? I hope I express my mind clear .Hope ans!