729. 我的日程安排表 I
class MyCalendar {
vector<pair<int, int>> booked;
public:
MyCalendar() {
}
bool book(int start, int end) {
for (auto x : booked)
if (start < x.second && end > x.first)
return false;
booked.push_back({start, end});
return true;
}
};
/**
* Your MyCalendar object will be instantiated and called as such:
* MyCalendar* obj = new MyCalendar();
* bool param_1 = obj->book(start,end);
*/
博客围绕 LeetCode 的 729. 我的日程安排表 I 展开,涉及算法相关内容,虽未详细阐述具体解法,但聚焦该算法题目。

461

被折叠的 条评论
为什么被折叠?



