using System.Collections.Generic;
public static void Main(string[] args)
Console.WriteLine("Calculate Palindrome level");
foreach (var test in _CreatePalindromeLevelTestWords())
_CheckAnswer(test.Key, test.Value, CalculatePalindromeLevel(test.Key));
Console.WriteLine("Sum of the palindrome level");
foreach (var test in _CreateSumOfPalindromeLevelTestWords())
_CheckAnswer(test.Key, test.Value, SumOfPalindromeLevel(test.Key));
private static int CalculatePalindromeLevel(string word)
throw new NotImplementedException();
public static int SumOfPalindromeLevel(string word)
throw new NotImplementedException();
public static Dictionary<string,int> _CreatePalindromeLevelTestWords()
return new Dictionary<string, int>
{"Sitis sit is s it is sitis",3 }
public static Dictionary<string, int> _CreateSumOfPalindromeLevelTestWords()
return new Dictionary<string, int>
{"Sitis sit is s it is sitis",7}
public static void _CheckAnswer(string question, int expected, int answer)
Console.WriteLine(answer.Equals(expected) ? "{0}:{1} (Right)" :"{0}:{1}(Wrong: expected {2})",question,answer,expected);