← All problemsSign in

Palindromic Substrings

Aniket is obsessed with strings. One day he wondered how many strings of length N exist whose every K length substring is a palindrome. Of course, such strings depend on the number of letters of the language of strings(like English language has 26 letters). He is interested in finding the sum of number of strings for the languages having L,L+1.... R letters. Since Aniket has to go Mumbai this week

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