Shortest Palindromic Substring
CodeChefOpen on judge ↗
Given a string consisting of only lowercase English alphabets, your task is to find the smallest palindromic substring. In case there are multiple palindromic substrings of the same length present, print the lexicographically smallest substring. Formally, a substring is a contiguous sequence of characters within a string. So in a string "abcdef", "abc" is a substring whereas "adf" is not a su
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.
Sign in to chat with the tutor and save your progress.
Sign in to start