Thanks for sharing this idea.

Here is my code with the same idea, maybe slightly faster, but I don't know why

class Solution(object):
def findRightInterval(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[int]
"""
sorted_start = sorted((interval.start, index) for index, interval in enumerate(intervals))
sorted_end = sorted((interval.end, index) for index, interval in enumerate(intervals))
length = len(intervals)
result = [-1] * length
i = 0
for start in sorted_start:
while start[0] >= sorted_end[i][0]:
result[sorted_end[i][1]] = start[1]
i += 1
return result