Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SML 5.isPalndrome-20% A palindrome is a sentence or phrase that is the same forwards and backwards, ignoring spaces, punctuation and other special characters, and upper
SML
5.isPalndrome-20% A palindrome is a sentence or phrase that is the same forwards and backwards, ignoring spaces, punctuation and other special characters, and upper vs. lower case. In this problem we will consider palindromes that include only letters, digits, and spaces but don't include any punctuation or any special characters - for example "a01 02 2010A", "Yreka Bakery", and "Doc note I dissent a fast never prevents a fatness I diet on cod". Assume that letters are case insensitive- for example "Madam Im Adam" Write an ML function isPalindrome that takes a string as argument and that returns true if the string is a palindrome and false otherwise. (Note: you can make use of the following ML functions rev (for reversing a list), String.explode (for retrieving the list of characters in a given string), and Char.toUpper (for retrieving the uppercase of a given character).) The type of isPalindrome should be: string bool. Examples isPalindrome"a01 02 2010A" true > isPalindrome "Doc note I dissent a fast never prevents a fatness I diet on cod" trueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started