Skip to content

Commit 61da266

Browse files
committed
Runtime: 267 ms (Top 75.00%) | Memory: 62.7 MB (Top 77.27%)
1 parent c0b6359 commit 61da266

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/algorithms/M/Maximum White Tiles Covered by a Carpet/Maximum White Tiles Covered by a Carpet.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 267 ms (Top 75.00%) | Memory: 62.7 MB (Top 77.27%)
12
/**
23
* @param {number[][]} tiles
34
* @param {number} carpetLen
@@ -6,7 +7,7 @@
67
var maximumWhiteTiles = function(tiles, carpetLen) {
78
const sorted = tiles.sort((a, b) => a[0]-b[0])
89
let res = 0
9-
10+
1011
let total = 0
1112
let right = 0
1213

@@ -24,6 +25,6 @@ var maximumWhiteTiles = function(tiles, carpetLen) {
2425
}
2526
total -= tile[1] - tile[0] + 1
2627
}
27-
28+
2829
return res
29-
};
30+
};

0 commit comments

Comments
 (0)