static bool Check2Str(string str1, string str2)
if(str1 == null && str2 == null) return false;
if(str1.Length == 0 && str2.Length == 0) return false;
int len = str1.Length > str2.Length ? str1.Length : str2.Length;
for(int i = 0, j = 0, k = 0; i < len; i++, j++, k++)
if(str1.Length == k || str2.Length == j)
if(Math.Abs(str1.Length - str2.Length) > 1) return false;
if(str1.Length != str2.Length)
if(str1.Length > str2.Length) j--;
public static void Main()
Console.WriteLine("Hello World " + Check2Str(str1, str2));