Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static bool IsPalindrome(string str)
- {
- if (str.Length == 1 || str.Length == 0) return true;
- return str[0] == str[str.Length - 1] && IsPalindrome(str.Substring(1, str.Length - 2));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement