A Common-Sense Guide to Data Structures and Algorithms, Second Edition:

Maybe best case of improved Intersection Algorithm perform N2/2 comparisons: A Common-Sense Guide to Data Structures and Algorithms, Second Edition: about 100( A Practical Example, Chapter 6)

Even if two arrays are identical, unless found common values are removed from secondArray, the algorithm performs N2/2 because comparisons each pass-through perform like 1, 2, 3, … N-3, N-2, N-1.

And sorry, I can’t provide the exact page because I read it at learning.oreilly.com.