当前位置:网站首页>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;
}
边栏推荐
- Zero rhino technology joined hands with the intelligence Club: the "causal faction" forum was successfully held, and the "causal revolution" brought the next generation of trusted AI
- XML configuration file (DTD detailed explanation)
- 哪些偏门项目可以做到?自媒体做到月赚一万以上很难吗?
- 20220703 week race: number of people who know the secret - dynamic rules (problem solution)
- 【luogu CF487E】Tourists(圆方树)(树链剖分)(线段树)
- Senparc. Weixin. Sample. MP source code analysis
- 什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
- Learn PWN from CTF wiki - ret2libc1
- 21. PWM application programming
- GFS Distributed File System
猜你喜欢
保研笔记二 软件工程与计算卷二(13-16章)
Problem solving win10 quickly open ipynb file
【在线聊天】原来微信小程序也能回复Facebook主页消息!
GFS distributed file system
多普勒效應(多普勒頻移)
Configuring OSPF GR features for Huawei devices
Bao Yan notebook IV software engineering and calculation volume II (Chapter 8-12)
Research notes I software engineering and calculation volume II (Chapter 1-7)
Use mapper: --- tkmapper
18.(arcgis api for js篇)arcgis api for js点采集(SketchViewModel)
随机推荐
20. Migrate freetype font library
NSSA area where OSPF is configured for Huawei equipment
选择致敬持续奋斗背后的精神——对话威尔价值观【第四期】
GFS distributed file system
Zhuan: in the future, such an organization can withstand the risks
FFmpeg学习——核心模块
How to improve eloquence
跟着CTF-wiki学pwn——ret2libc1
What if the C disk is not enough? Let's see how I can clean up 25g of temp disk space after I haven't redone the system for 4 years?
数据库遇到的问题
What are the functions of Yunna fixed assets management system?
什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
Biased sample variance, unbiased sample variance
[online chat] the original wechat applet can also reply to Facebook homepage messages!
rsync远程同步
权限问题:source .bash_profile permission denied
如何获取localStorage中存储的所有值
时区的区别及go语言的time库
XML配置文件(DTD详细讲解)
openssl-1.0.2k版本升级openssl-1.1.1p