I have 2
Lists. The first one includes all the numbers from 1 to 10.
The second includes random numbers, like this:
I want to find an algorithm that will take any number of the second list
listB and compare it to all numbers in
listA. If the number in
listB is equal to a number in
listA, I"ll get 1 as a result. If not it will be 0. As a final result I would like to sum all equal numbers.
Here, for example we have the result 6 because we can find 2 (twice), 7 (twice), 5 and 10 in the two lists. I need a general way because my lists includes data of 10,000 numbers.