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 ( ) {
32 this . events = [ ] ;
43 this . overlaps = [ ] ;
54} ;
65
7- /**
8- * @param {number } start
6+ /**
7+ * @param {number } start
98 * @param {number } end
109 * @return {boolean }
1110 */
12- MyCalendarTwo . prototype . book = function ( start , end ) {
11+ MyCalendarTwo . prototype . book = function ( start , end ) {
1312 for ( let [ s , e ] of this . overlaps ) {
1413 if ( Math . max ( start , s ) < Math . min ( end , e ) ) {
1514 return false ;
@@ -26,7 +25,7 @@ MyCalendarTwo.prototype.book = function(start, end) {
2625 return true ;
2726} ;
2827
29- /**
28+ /**
3029 * Your MyCalendarTwo object will be instantiated and called as such:
3130 * var obj = new MyCalendarTwo()
3231 * var param_1 = obj.book(start,end)
You can’t perform that action at this time.
0 commit comments