File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
solution/0700-0799/0731.My Calendar II Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
-
2
- var MyCalendarTwo = function ( ) {
1
+ var MyCalendarTwo = function ( ) {
3
2
this . events = [ ] ;
4
3
this . overlaps = [ ] ;
5
4
} ;
6
5
7
- /**
8
- * @param {number } start
6
+ /**
7
+ * @param {number } start
9
8
* @param {number } end
10
9
* @return {boolean }
11
10
*/
12
- MyCalendarTwo . prototype . book = function ( start , end ) {
11
+ MyCalendarTwo . prototype . book = function ( start , end ) {
13
12
for ( let [ s , e ] of this . overlaps ) {
14
13
if ( Math . max ( start , s ) < Math . min ( end , e ) ) {
15
14
return false ;
@@ -26,7 +25,7 @@ MyCalendarTwo.prototype.book = function(start, end) {
26
25
return true ;
27
26
} ;
28
27
29
- /**
28
+ /**
30
29
* Your MyCalendarTwo object will be instantiated and called as such:
31
30
* var obj = new MyCalendarTwo()
32
31
* var param_1 = obj.book(start,end)
You can’t perform that action at this time.
0 commit comments