Efficient algorithm for comparing lists
Input – list of 24 integers from -15 to 15; let’s call it Sequence. Another input – list of 7000+ lists of four integers from 0 to 23 representing offsets of Sequence. For example [0, 3 , 5,8] or [5,7,7,11]; let’s call them Moves. I need to test each Move against Sequence to see if they match based on certain conditions. The output will be subset of Moves. For example for a Move [0,2,4,7] the code will be