How to tell if 2 arrays share the same element.

Posted by Ommit on Stack Overflow See other posts from Stack Overflow or by Ommit
Published on 2010-06-16T17:28:11Z Indexed on 2010/06/16 19:22 UTC
Read the original article Hit count: 193

Filed under:
|
|
|
|

So this is a simpler form of my problem. Lets say I have 2 arrays. A= {1,2} and B={2,4,6}. If A and B share an element then delete that element from B. I know you can loop through and compare each element in A to each element in B, but there's got to be a better way!

© Stack Overflow or respective owner

Related posts about arrays

Related posts about excel