@kikon
Final question. And once again, very grateful for walking me through this.
I think I understand everything except for this condition i - j - 1 < new_str.length as part of that double condition if statement**.** You explained the role of
i - j - 1 < new_str.length
as follows:
if -- i - j - 1 < new_str.length results in ignoring all the positions that are not in the initial string. So we can write the imaginary strings as '*bcddc?' and '**cddc??' where * stands for a character that is ignored for the palindrome test.How does i - j - 1 < new_str.length ignore all of the positions of the initial 6 character string, and by ignoring those those positions, such as
'*bcddc?'
does that mean that b is now index 0, c is index 1, and so forth?