Problem 44512. Find if a given sentence is a palindrome

Solution 3004705

Submitted on 29 Sep 2020 at 2:23 by Rafael S.T. Vieira
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = "Nella's simple hymn: ""I attain my help, Miss Allen."; y_correct = true; assert(isequal(isPalindrome(x),y_correct))

2   Pass
x = "Deliver desserts,"" demanded Nemesis, ""emended, named, stressed, reviled."; y_correct = true; assert(isequal(isPalindrome(x),y_correct))

3   Pass
x = "Dennis danced"; y_correct = false; assert(isequal(isPalindrome(x),y_correct))

4   Pass
x = "Fred ate bread"; y_correct = false; assert(isequal(isPalindrome(x),y_correct))

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!