Removing the suffix and prefix subStrings which already forms a palindrome and storing them in separate Strings
prefix = str . Substring ( 0 , len ) ; suffix = str . Substring ( n - len ) ; str = str . Substring ( len , ( n - 2 * len ) + len ) ;