If both are equal then the substring is a palindrome
if ( hash_LR == reverse_hash_LR ) { if ( isPalindrome ( str , L , R ) == true ) { Console . Write ( " The ▁ Substring ▁ [ { 0 } ▁ { 1 } ] ▁ is ▁ a ▁ " + " palindrome STRNEWLINE " , L , R ) ; } else { Console . Write ( " The ▁ Substring ▁ [ { 0 } ▁ { 1 } ] ▁ is ▁ not ▁ a ▁ " + " palindrome STRNEWLINE " , L , R ) ; } } else { Console . Write ( " The ▁ Substring ▁ [ { 0 } ▁ { 1 } ] ▁ is ▁ not ▁ a ▁ " + " palindrome STRNEWLINE " , L , R ) ; } } return ; }