(s)
| 6 | * @return {boolean} |
| 7 | */ |
| 8 | var isPalindrome = function (s) { |
| 9 | if (!s.length) return true; |
| 10 | |
| 11 | const alphaNumeric = filterAlphaNumeric(s); /* Time O(N) | Space O(N) */ |
| 12 | const reversed = reverse(alphaNumeric); /* Time O(N) | Space O(N) */ |
| 13 | |
| 14 | return alphaNumeric === reversed; |
| 15 | }; |
| 16 | |
| 17 | const filterAlphaNumeric = ( |
| 18 | s, |
nothing calls this directly
no test coverage detected