In this question we have to print lexicographically smallest pallendromic substring
but i have written a code to print a char which is lexicographically smallest and it is accepting with AC .Can someone make me clear about the question whether i am unable tho understand question or there is a problem in one.
my solution ::https://www.codechef.com/submit/ECAPR201
1 Like
A single char is also a palindrome.
4 Likes
it mean we just have to give lexicographically smallest letter only?
exactly you just have to print lexicographically smallest letter present
2 Likes
a single char is also a palindrome and here it necessarily means a single character there may be several palindromes present in a string we need to print lexicographically smallest. for example s=“abab”, here we have many palindromic substring but smallest one is a.
https://www.codechef.com/viewsolution/32310795
1 Like