Add merge intervals interview problem