← All problemsSign in

Palindromeness

CodeChefRating 3062Open on judge ↗

Let us define the palindromeness of a string in the following way: - If the string is not a palindrome, its' palindromeness is zero. - The palindromeness of an one-letter string is 1. - The palindromness of a string S of the length greater than one is 1 + "palindromeness of the string that is formed by the first [|S|/2] symbols of S". Let us consider some examples for better understanding: -

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start