Amazon Interview Question

A coding problem involving sorting intervals