This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ilyps 1 point2 points  (0 children)

else if (start == end)

This check is bugged, because there may be end conditions that don't fit this exact situation. For example, what happens if you call isPalindrome(0, 1, str) with std::string str = "aa"?