I have 200 arrays of sorted positive integers (some of them have over a million of numbers). I need to find the first number that exists in every array. What would you suggest?
Edit: a code example:
while n < len(data):
item = data[n][indices[n]]
if item < reference:
indices[n] += 1
elif item == reference:
n += 1
elif item > reference:
reference = item
n = 0
print reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With