updated merge intervals problem solution