Tag Archives: palindrome

Given a string, S, the task is to find the maximum number of distinct indexed palindromic subsequences of length 3 possible from the given string.… Read More
Prerequisites: Z-algorithm Given a string S, the task is to find the maximum number of palindromes that can be formed after performing the given steps:… Read More
Given an array arr[] of size 26, representing frequencies of character ‘a’ to ‘z’, the task is to find the maximum number of palindromic strings… Read More
Given a positive integer N, the task is to find the largest palindromic number less than N and can be expressed as the product of… Read More
Given two intgers N and K (K ≤ N), the task is to obtain a string of length N such that maximum length of a… Read More
Given a matrix with N rows and M columns, the task is to find the minimum replacements requried to make all rows and columns of… Read More
Given two strings a and b of the same length, the task is to check if splitting both the strings and concatenating their opposite substrings,… Read More
Given a string S of size N and a positive integer K ( where N % K = 0), the task is to find the… Read More
Given a binary string str of length N, and an integer K, the task is to find the lexicographically smallest permutation of the string str… Read More
Given a positive integer N, the task is to find the number of alphanumeric palindromic strings of length N. Since the count of such strings… Read More
Given two strings, str1 and str2 consisting of N lowercase alphabets, the task is to find the minimum count of operations of the following two… Read More
Given number can be said palindromic in nature if the reverse of the given number is the same as that of a given number. Length… Read More
Given string str consisting of lowercase letters, the task is to find the minimum number of characters to be deleted from the given string such… Read More
Given an integer N, the task is to find the closest palindromic number which is smaller than N. Examples: Input: N = 4000Output: 393Explanation:3993 is… Read More