Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Panama"is a palindrome."race a car"is not a palindrome. Note: Have you consider that the…
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: Input: "aab" Output: [ ["aa","b"], ["a","a","b"…
//判断给定字符串是否是回文 function isPalindrome(word) { var s = new Stack(); for (var i = 0; i < word.length; i++) { s.push(word[i]); } var rword = ""; while (s.length()>0) { rword +…