Number of palindromic paths in a matrix

Problem Statement We are given a two-dimensional matrix containing lowercase English alphabets, we need to count the number of palindromic paths in it. A palindromic path is nothing but a path following palindromic property. A word which when reversed remains the same as the initial word is said to be …

Read more

Smallest Palindrome after Replacement

Problem Statement In the “Smallest Palindrome after Replacement” problem we have given the input string contains lower case alphabets characters and dots(.). We need to replace all dots with some alphabet character in such a way that the resultant string becomes a palindrome. The palindrome should be lexicographically smallest. Input …

Read more

Longest Palindrome can be Formed by Removing or Rearranging Characters

Problem Statement In the “Longest Palindrome can be Formed by Removing or Rearranging Characters” problem we have given a string “s”. Find the longest palindrome that can be constructed by removing or rearranging some characters or possibly zero characters from the string. There may be multiple solutions possible, you can …

Read more

Translate »