How to find all lower and upper values for a given value in a periodic list
How to find all lower and upper values for a given value in a list Question: I have an array that looks like this: [1,2,4,1,2,5,1,2,6] Given a value of 3 I want to find all value-pairs in the list above that encapsulate that given value. i.e; [2,4];[2,5];[2,6] I can find the [2,6] values by using …