Find all distinct palindromic sub-strings of a given string
Given a string of lowercase ASCII characters, find all distinct continuous palindromic sub-strings of it.
Examples:
Examples:
Input: str = "abaaa" Output: Below are 5 palindrome sub-strings a aa aaa aba b Input: str = "sudhakar" Output: Below are 4 palindrome sub-strings s aka d h
u
a
r
No comments:
Post a Comment