If I have two lists each with elements that can be one of two possible values and the two lists are identical except for one value, which method should I use to find the index of that value? I am going to code this in Python as background information
Method A:
1. represent both lists as a binary literals
2. use XOR on the two binary literals to give a value "v" that is a power of 2
3. finally, use math.log(v, 2) to get the index
or Method B:
just iterate through both lists until a different element is found and
get the index
or another way using Python?