当前位置:网站首页>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;
}边栏推荐
- FFT 学习笔记(自认为详细)
- 上门预约服务类的App功能详解
- [SQL] SQL expansion languages of mainstream databases (T-SQL, pl/sql, pl/pgsql)
- 总结了 800多个 Kubectl 别名,再也不怕记不住命令了!
- 传输层协议------UDP协议
- NSSA area where OSPF is configured for Huawei equipment
- 教你在HbuilderX上使用模拟器运行uni-app,良心教学!!!
- QT -- thread
- Single merchant v4.4 has the same original intention and strength!
- 15 MySQL stored procedures and functions
猜你喜欢

保研笔记二 软件工程与计算卷二(13-16章)

Biased sample variance, unbiased sample variance

多普勒效应(多普勒频移)

PV静态创建和动态创建

Breadth first search open turntable lock

Teach you to run uni app with simulator on hbuilderx, conscience teaching!!!

GFS distributed file system

Mathematical model Lotka Volterra

Tips for using pads router

CAS and synchronized knowledge
随机推荐
20220703 周赛:知道秘密的人数-动规(题解)
开源crm客户关系统管理系统源码,免费分享
Learn PWN from CTF wiki - ret2libc1
Redis高可用——主从复制、哨兵模式、集群
What are the functions of Yunna fixed assets management system?
QT--线程
NSSA area where OSPF is configured for Huawei equipment
【luogu P3295】萌萌哒(并查集)(倍增)
[EF core] mapping relationship between EF core and C data type
Transport layer protocol ----- UDP protocol
总结了 800多个 Kubectl 别名,再也不怕记不住命令了!
20220703 week race: number of people who know the secret - dynamic rules (problem solution)
JVM details
哪些偏门项目可以做到?自媒体做到月赚一万以上很难吗?
Rsync remote synchronization
Qt 一个简单的word文档编辑器
C file and folder operation
How to rotate the synchronized / refreshed icon (EL icon refresh)
保研笔记二 软件工程与计算卷二(13-16章)
Upgrade openssl-1.1.1p for openssl-1.0.2k