Lets say we have an array K[i] , i ∈ [0,N) and M amount of couples b[j] and e[j], j ∈ [0,M) and 0<=b[j]