算法-双指针思想

leetcode

125. 验证回文串

自己写的

    var isPalindrome = function(s){
      let i = 0;
      let j = s.length -1;

      while(i = 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')
    }

正确

var isPalindrome = function(s) {
  var s = s.toUpperCase();
  let i =0;
  let j = s.length -1;
  while(i = 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')
}

你可能感兴趣的:(算法)