We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5927c3d commit a4b0a17Copy full SHA for a4b0a17
solution/0700-0799/0729.My Calendar I/Solution.js
@@ -1,14 +1,13 @@
1
-
2
-var MyCalendar = function() {
+var MyCalendar = function () {
3
this.calendar = [];
4
};
5
6
-/**
7
- * @param {number} start
+/**
+ * @param {number} start
8
* @param {number} end
9
* @return {boolean}
10
*/
11
-MyCalendar.prototype.book = function(start, end) {
+MyCalendar.prototype.book = function (start, end) {
12
for (const item of this.calendar) {
13
if (end <= item[0] || item[1] <= start) {
14
continue;
@@ -19,7 +18,7 @@ MyCalendar.prototype.book = function(start, end) {
19
18
return true;
20
21
22
23
* Your MyCalendar object will be instantiated and called as such:
24
* var obj = new MyCalendar()
25
* var param_1 = obj.book(start,end)
0 commit comments