Problems that can be solved using interval trees