1. Engineering
  2. Computer Science
  3. how can i check to see if 2 arrays contain...

Question: how can i check to see if 2 arrays contain...

Question details

How can I check to see if 2 arrays contain the same element using nothing worse than linear runtime? (Java)

For example if I have 2 arrays with elements {7, 8, 5, 4, 3} and {10, 12, 15, 20, 8}

I would want it to return true since there is an 8 in each array.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution