Tag: palindromicsubstrings

  • Data Structures & Algorithms in Java – Strings – Palindromic substrings

    Problem: Given a string , find the number of palindromic substrings in the string. For example , for the input “babad” the number of palindromic substrings is 7: “b” , “a”, “b”,”a”,”d” , “aba” , “bab” Try out the solution here: https://leetcode.com/problems/palindromic-substrings/ Solution: The solution is almost the same as we discussed in the previous…