当前位置:网站首页>2022.7.5-----leetcode. seven hundred and twenty-nine
2022.7.5-----leetcode. seven hundred and twenty-nine
2022-07-05 23:57:00 【Lu 727】
List<int[]> booked;// Scheduled interval
public MyCalendar() {
booked = new ArrayList<int[]>();
}
public boolean book(int start, int end) {
for (int[] arr : booked) {
int l = arr[0], r = arr[1];
// For each interval , Determine whether there will be overlap
if ( start < r&&end> l ) {
return false;
}
}
booked.add(new int[]{start, end});
return true;
}
边栏推荐
猜你喜欢
openssl-1.0.2k版本升级openssl-1.1.1p
5. Logistic regression
Miaochai Weekly - 8
After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
如何获取localStorage中存储的所有值
PV static creation and dynamic creation
Tips for using pads router
Senparc. Weixin. Sample. MP source code analysis
NSSA area where OSPF is configured for Huawei equipment
多普勒效應(多普勒頻移)
随机推荐
硬件及接口学习总结
Bao Yan notes II software engineering and calculation volume II (Chapter 13-16)
认识提取与显示梅尔谱图的小实验(观察不同y_axis和x_axis的区别)
[binary search tree] add, delete, modify and query function code implementation
Rsync remote synchronization
CloudCompare&PCL 点云随机添加噪声
Tips for using pads router
The use of El cascader and the solution of error reporting
openssl-1.0.2k版本升级openssl-1.1.1p
微信小程序---WXML 模板语法(附带笔记文档)
做自媒体影视短视频剪辑号,在哪儿下载素材?
JVM details
云呐|固定资产管理系统主要操作流程有哪些
提升工作效率工具:SQL批量生成工具思想
用列表初始化你的vector&&initializer_list简介
【luogu CF487E】Tourists(圆方树)(树链剖分)(线段树)
【在线聊天】原来微信小程序也能回复Facebook主页消息!
Configuring OSPF load sharing for Huawei devices
"14th five year plan": emphasis on the promotion of electronic contracts, electronic signatures and other applications
21. PWM application programming