Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

palindrome string

const isPalindrome = (str) => {
    
    const preprocessing_regex = /[^a-zA-Z0-9]/g,
    processed_string = str.toLowerCase().replace(preprocessing_regex , ""),
    integrity_check = processed_string.split("").reverse().join("");
    if(processed_string === integrity_check) return true
    else return false
         
        }

//if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by practice.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #palindrome #string
ADD COMMENT
Topic
Name
8+3 =