Matty:
Yeah, think of these as objects in a linked list that could be in any order, and there may be only one duplicate, or all of them duplicated. The lists for example could be:
List 1:
2
1
3
5
List 2:
4
5
1
Because 5 and 1 are in both lists, there will be duplicate compares.
Yeah, think of these as objects in a linked list that could be in any order, and there may be only one duplicate, or all of them duplicated. The lists for example could be:
List 1:
2
1
3
5
List 2:
4
5
1
Because 5 and 1 are in both lists, there will be duplicate compares.