Longest run of consecutive strike prices
An options chain lists integer strike prices in no particular order and with possible duplicates. Find the length of the longest run of consecutive integers that all appear (for example, 100, 101, 102). The strikes need not be adjacent in the list.
strikes = [100, 4, 101, 3, 2, 102]
-> 3 # both {2,3,4} and {100,101,102} have length 3
Return the length of the longest consecutive run. Aim for .
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.