<Al************@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
I have 2 list of class A, is there a STL algorithm which find out if
there is equal element between them (using == operator of A)?
If the only comparison operator available is ==, then anything you do is
going to be slow because you have to compare all pairs of elements from the
two lists. You can use the find_first_of algorithm to do those comparisons.
If you have an order relation such as < available, there are other
algorithms, typically involving sorting, that will answer your question more
quickly on average. If you tell us what operations are available, we may be
able to suggest a strategy.