Skip to content

Commit

Permalink
add (leetcode 125. Valid Palindrome): js 풀이
Browse files Browse the repository at this point in the history
  • Loading branch information
padosum committed May 11, 2022
1 parent a6d7c1c commit 9df7b3f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions leetcode/easy/125-valid-palindrome.js
@@ -0,0 +1,9 @@
/**
* @param {string} s
* @return {boolean}
*/
var isPalindrome = function (s) {
s = s.replace(/[^0-9a-z]/gi, '').toLowerCase()

return s === s.split('').reverse().join('')
}

0 comments on commit 9df7b3f

Please sign in to comment.