using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
string[] array = { "civic", "deified", "microsoft", "deleveled", "devoved", "dewed", null,
"level", "madam", "raceCar", "radar", "refer", "Net", "repaper",
"A", "", "Kris", "hello",
"reviver", "rotator", null,
"rotor", "sagas", "Palindrome", "solos", "sexes", "stats", "tenet",
Console.WriteLine("Palindroms: " + string.Join("; ", array.Where(s => IsPalindrome(s))));
public static bool IsPalindrome(string phrase)
if (string.IsNullOrEmpty(phrase))
phrase = phrase.ToLowerInvariant();
if (phrase.Reverse().ToString() != phrase)
for (int i=0; i <= phrase.Length / 2; i++)
if (phrase[i] != phrase[phrase.Length - i - 1])