Skip to content

Commit 383b564

Browse files
committed
revise
1 parent dfa8680 commit 383b564

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Array/array.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- 解题思路:在这个题目里,如果一个人要参加所有会议,那么所有会议的时间应该不能重合,所以只需要判断后一个会议开始的start > 前一个会议结束的end就就可以,如果end>start,就返回false。首先得先对所有子数组的start进行排序,然后再进行判断start和end
5858

5959
Java解法
60-
```
60+
```java
6161
class Solution{
6262
public boolean canAttendMeetings(Interval[] intervals){
6363
Arrays.sort(intervals,(x,y)->(x.start-y.start);
@@ -69,8 +69,9 @@ class Solution{
6969
}
7070
return true;
7171
```
72+
7273
Python解法
73-
```
74+
```python
7475
class Solution(object):
7576
def canAttendMeetings(self, intervals):
7677
"""

0 commit comments

Comments
 (0)