leetcode

Leetcode Solutions (0x6A73)
git clone https://git.pngu.org/leetcode
Log | Files | Refs | Submodules | README

max_num_events_attended.c (368B)


1
2
3
4
5
6
7
8
9
#include "leetcode.h"

/*
 * you are given an array of 'events' where 'events[i] = [startday_i,
 * endday_i]'. every event 'i' starts at 'startday_i' and ends at 'endday_i'.
 * you can attend an event 'i' at any day 'd' where 'starttime_i <= d <=
 * endtime_i'. you can only attend one event at any time 'd'. return the maximum
 * number of events you can attend.
 */