I have two integer arrays which contain numeric values. I want to look through both lists and check for commonality (or lack of) between the lists. I.e. I want to iterate th
When using two nested loops the complexity will be O(n*n).
Sorting both array can be done in complexity O(n log n).
AS Marcelo Cantos stated duck-waddle :)
through both in paralell has complexity O(n) leading to an overall complexity of O(n log n) + O(n) which is O (n log n).