We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

@KonshensX with the count you figure out if a given input is a palindrome or not. Just understand the logic and implement it. It make it easier. That was very smart @YaMogu. Thanks for the hint.

To be more practical, baabbaab has an even length(8) as the length of letters a & b is even(4) thus a palindrome. Likewise aabaa has an odd length(5) but the length of letter a is even(2) and only one odd char b thus a palindrome otherwise not. Hope this will easy comprehension.

## Game of Thrones - I

You are viewing a single comment's thread. Return to all comments →

i still haven't figured out how am i supposed to count each element and checking if the count is even or not .

@KonshensX with the count you figure out if a given input is a palindrome or not. Just understand the logic and implement it. It make it easier. That was very smart @YaMogu. Thanks for the hint.

To be more practical,

baabbaabhas an even length(8) as the length of lettersa&bis even(4) thus a palindrome. Likewiseaabaahas an odd length(5) but the length of letterais even(2) and only one odd charbthus a palindrome otherwise not. Hope this will easy comprehension.