Skip to content

Commit 8e138a4

Browse files
committed
add complexity
1 parent c6f7608 commit 8e138a4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

valid-palindrome/froggy1014.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
/**
2-
* @param {string} s
3-
* @return {boolean}
4-
*/
5-
1+
// Time Complexity O(n)
2+
// Space Complexity O(n)
63
var isPalindrome = function (s) {
74
const str = s.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
85
let left = 0;

0 commit comments

Comments
 (0)