Problem 44512. Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false.
For example:
sample_text = "Sore was I ere I saw Eros."; isPalindrome(sample_text); ans = True
Solution Stats
Problem Comments
-
1 Comment
Hello, Srijith Vijay. Thank-you for creating this interesting Problem. In your Problem Statement you refer to "a string/character array". It is worth noting that the 'string array' data type (string) and the 'character array' data type (char) are different, and functions that work for one of these data types don't always work correctly with the other. If you want Players to accommodate both data types, it would be best to include such in the Test Suite. If you only want Players to work with inputs of the string data type, then your Problem Statement could be reworded to improve the clarity. Regards, DIV.
Solution Comments
Show commentsProblem Recent Solvers32
Suggested Problems
-
Sum of first n terms of a harmonic progression
413 Solvers
-
Calculate the area of a triangle between three points
2861 Solvers
-
Determine the number of odd integers in a vector
709 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
533 Solvers
-
3729 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!