summaryrefslogtreecommitdiff
path: root/progs/a667.py
blob: 9360352e0e93cf288f9150db53e22eb0f937a53f (plain)
1
2
3
4
5
6
7
8
9
10
def find_Element(arr,ranges,rotations,index) :  
    for i in range(rotations - 1,-1,-1 ) : 
        left = ranges[i][0] 
        right = ranges[i][1] 
        if (left <= index and right >= index) : 
            if (index == left) : 
                index = right 
            else : 
                index = index - 1 
    return arr[index]