from typing import List


def can_attend_all_appointments(intervals: List[List[int]]) -> bool:
    """
    The problem follows the Merge Intervals pattern. We can sort all the intervals by start time and then check if any
    two intervals overlap. A person will not be able to attend all appointments if any two appointments overlap.

    Time Complexity: O(N * log(N))
    Space Complexity: O(N)

    Parameters
    ----------
    intervals : List[List[int]]
        input intervals

    Returns
    -------
    bool
        Whether a person can attend all the appointments.

    """
    intervals.sort(key=lambda x: x[0])
    for i in range(1, len(intervals)):
        if intervals[i][0] < intervals[i - 1][1]:
            return False
    return True