Error:
do not know how to do. Just follow the brain: 1) sort by start time. 2) use minheap to handle the end time, if current start time is less than min. end time in the heap, push it, otherwise update the end time.
split begin and end into two separate vectors maybe good to handle it. Because we do not care which meeting we currently handle, we just care about how many meeting currently happen.
-
So we can first sort the start time and end time separately,
-
then for each start time, check if current end time is out of start time or not, if not, move end pointer and increase result.