- #1
ORF
- 170
- 18
Hello
I need to find coincidences between items in 2 lists. The lists have disordered items, so the first idea I had was to sort the items in the correct order and then finding the coincidences would be easy. The main problem is the big amount of items in the lists. I was using "double-linked lists" in order to sort the items.
Another idea is to compare each item of one list with all the items in the other list.
The two methods seemed to me horribly slow, so my doubt is: is there a better algorithm to find coincidences between two lists?
Thanks in advance :)
Greetings
I need to find coincidences between items in 2 lists. The lists have disordered items, so the first idea I had was to sort the items in the correct order and then finding the coincidences would be easy. The main problem is the big amount of items in the lists. I was using "double-linked lists" in order to sort the items.
Another idea is to compare each item of one list with all the items in the other list.
The two methods seemed to me horribly slow, so my doubt is: is there a better algorithm to find coincidences between two lists?
Thanks in advance :)
Greetings