当前位置:网站首页>2022.7.5-----leetcode.729
2022.7.5-----leetcode.729
2022-07-05 23:50:00 【路Lu727】
List<int[]> booked;//已预定区间
public MyCalendar() {
booked = new ArrayList<int[]>();
}
public boolean book(int start, int end) {
for (int[] arr : booked) {
int l = arr[0], r = arr[1];
//对于每个区间,判断是否会重叠
if ( start < r&&end> l ) {
return false;
}
}
booked.add(new int[]{start, end});
return true;
}边栏推荐
- China Jinmao online electronic signature, accelerating the digitization of real estate business
- 俄外交部:日韩参加北约峰会影响亚洲安全稳定
- 如何提升口才
- 用列表初始化你的vector&&initializer_list简介
- STM32__ 06 - single channel ADC
- 微信小程序---WXML 模板语法(附带笔记文档)
- 14 MySQL view
- Problem solving win10 quickly open ipynb file
- PADS ROUTER 使用技巧小记
- Zhuan: in the future, such an organization can withstand the risks
猜你喜欢
随机推荐
Bao Yan notebook IV software engineering and calculation volume II (Chapter 8-12)
Opencvsharp (C openCV) shape detection and recognition (with source code)
TS type declaration
C# 反射与Type
时区的区别及go语言的time库
GFS分布式文件系统
VBA fast switching sheet
【luogu P3295】萌萌哒(并查集)(倍增)
20.移植Freetype字体库
[Luogu p3295] mengmengda (parallel search) (double)
PV静态创建和动态创建
Make a short video clip number of we media film and television. Where can I download the material?
How to rotate the synchronized / refreshed icon (EL icon refresh)
Miaochai Weekly - 8
STM32__06—单通道ADC
How to get all the values stored in localstorage
98. Verify the binary search tree ●●
Comparison of parameters between TVs tube and zener diode
China Jinmao online electronic signature, accelerating the digitization of real estate business
转:未来,这样的组织才能扛住风险









