We can sort the intervals by the start time, if those intervals have no overlap, then the person could attend all meetings.
if we sort intervals by the start endpoint of an interval, those merge-able intervals must be consecutive.
We can solve this problem by using a greedy strategy.