E570
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d1ba18 commit 8a5f525Copy full SHA for 8a5f525
README.md
@@ -3,7 +3,34 @@
3
List is periodically updated
4
5
## LeetCode
6
+### #125 Valid Palindrome
7
8
+```
9
+
10
+var isPalindrome = function(s) {
11
+ let i = 0;
12
+ let j = s.length - 1;
13
14
+ while(i < j){
15
+ let left = s[i].toLowerCase()
16
+ let right = s[j].toLowerCase()
17
18
+ if (/\W|_/g.test(left)){
19
+ i++;
20
+ } else if (/\W|_/g.test(right)){
21
+ j--;
22
+ } else if (left == right){
23
24
25
+ } else {
26
+ return false
27
+ }
28
29
+ return true
30
+};
31
32
33
34
### #1 Two Sum
35
36
```
0 commit comments