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, 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.