I want to do a binary search in a multi-list, by multi-list I mean the values in a list can be multiples. For instance: We have an ordered list [1,1,1,1,1,2,2,2,2,2,3,3,3,3,]. What is the most efficient algorithm to find the index of the first 2 in this list.
How can I improve this result