Skip to content

Commit 5eb95f1

Browse files
committed
Runtime: 1073 ms (Top 40.58%) | Memory: 43.7 MB (Top 82.61%)
1 parent 7430c70 commit 5eb95f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/P/Palindrome Partitioning II/Palindrome Partitioning II.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
// Runtime: 1073 ms (Top 40.58%) | Memory: 43.7 MB (Top 82.61%)
12
var minCut = function(s) {
23
function isPal(l, r) {
34
while (l < r) {
45
if (s[l] === s[r]) l++, r--;
56
else return false;
67
} return true;
78
}
8-
9+
910
let map = new Map();
1011
function dfs(idx = 0) {
1112
if (idx === s.length) return 0;
@@ -19,4 +20,4 @@ var minCut = function(s) {
1920
}
2021

2122
return dfs() - 1;
22-
};
23+
};

0 commit comments

Comments
 (0)