using System; namespace ALGA { public class StringReverse { public static String string_reverse(String s) { if (s.Length == 0) return s; return s[s.Length - 1] + string_reverse(s.Substring(0, s.Length - 1)); } public static bool is_palindrome(String s) { if (s.Length < 2) return true; if (s[0] != s[s.Length - 1]) return false; return is_palindrome(s.Substring(1, s.Length - 2)); } } }