In Algorithm 1 , limits is sorted by the first index in descending order, which means limits[0][0] is the largest among limits[j][0].
So, either $s$ is smaller than limits[0][0], and be assigned to device 0, or $s$ is larger than limits[0][0], which means $s$ is larger than any other limits[j][0], and be assigned to device M-1.
In a word, only device 0 and M-1 will be assign to, what the loop structure for?
