Find if string is K-Palindrome or not | Set 2
Given a string, find out if the string is K-Palindrome or not. A K-palindrome string transforms into a palindrome on removing at most k characters… Read More »
Given a string, find out if the string is K-Palindrome or not. A K-palindrome string transforms into a palindrome on removing at most k characters… Read More »
A k-Almost Prime Number is a number having exactly k prime factors (not necessary distinct). For example, 2, 3, 5, 7, 11 ….(in fact all… Read More »
Add two fraction a/b and c/d and print answer in simplest form. Examples : Input: 1/2 + 3/2 Output: 2/1 Input: 1/3 + 3/9 Output:… Read More »
Given a small integer n, print all the n’th roots of unity up to 6 significant digits. We basically need to find all roots of… Read More »
Given a Romal numeral, the task is to find its corresponding decimal value. Example : Input: IX Output: 9 IX is a Roman symbol which… Read More »
Given an integer n, denoting the number of cuts that can be made on a pancake, find the maximum number of pieces that can be… Read More »
Write code to convert a given number into words. Examples: Input: 438237764 Output: forty three crore eighty two lakh thirty seven thousand seven hundred and… Read More »
Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) =… Read More »
Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) =… Read More »
A surpasser of an element of an array is a greater element to its right, therefore x[j] is a surpasser of x[i] if i <… Read More »
Given two strings X and Y, print the shortest string that has both X and Y as subsequences. If multiple shortest supersequence exists, print any… Read More »
Given two sequences, print all longest subsequence present in both of them. Examples: Input: string X = “AGTGATG” string Y = “GTTAG” Output: GTAG GTTG… Read More »
Given a string and several queries on the substrings of the given input string to check whether the substring is a palindrome or not. Examples… Read More »
Given a string, find out if string follows a given pattern or not without using any regular expressions. Examples: Input: string – GraphTreesGraph pattern -… Read More »
Given three numbers a, b and c such that a, b and c can be at most 1016. The task is to compute (a*b)%c A… Read More »