Questions related to strings

## Polybius Square Cipher

A Polybius Square is a table that allows someone to convert letters into numbers. To make the encryption little harder, this table can be randomized… Read More »

## Tribonacci Word

Like Fibonacci word, a Tribonacci word. is a specific sequence of digits. The Tribonacci word is formed by repeated concatenation in the same way that… Read More »

## Minimum removal to make palindrome permutation

Given a string S, we have to find minimum characters that we can remove to make any permutation of the string S a palindrome. In… Read More »

## Partition given string in such manner that i’th substring is sum of (i-1)’th and (i-2)’th substring

Partition given string in such manner that i’th substring is sum of (i-1)’th and (i-2)’nd substring. Examples: Input : “11235813” Output : [“1”, “1”, “2”,… Read More »

## Sparse Search

Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. Examples: Input… Read More »

## Maximum segment value after putting k breakpoints in a number

Given a large number as string s and an integer k which denotes the number of breakpoints we must put in the number k <=… Read More »

## Remove all the palindromic words from the given sentence

Given a sentence str. The problem is to remove all the palindromic words from the given sentence. Examples: Input : str = “Text contains malayalam… Read More »

## Prefix to Infix Conversion

Infix : An expression is called the Infix expression if the operator appears in between the operands in the expression. Simply of the form (operand1… Read More »

## Prefix to Postfix Conversion

Prefix : An expression is called the prefix expression if the operator appears in the expression before the operands. Simply of the form (operator operand1… Read More »

## Practice questions on Strings

String is an important topic from GATE exam point of view. We will discuss key points on strings as well different types of questions based… Read More »

## Postfix to Prefix Conversion

Postfix: An expression is called the postfix expression if the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator).… Read More »

## Rearrange characters to form palindrome if possible

Given a string, convert the string to palindrome without any modifications like adding a character, removing a character, replacing a character etc. Examples: Input :… Read More »

## Longest prefix which is also suffix

Given a string s, find length of the longest prefix which is also suffix. The prefix and suffix should not overlap. Examples: Input : aabcdaabc… Read More »

## Postfix to Infix

Infix expression: The expression of the form a op b. When an operator is in-between every pair of operands. Postfix expression: The expression of the… Read More »

## Print distinct sorted permutations with duplicates allowed in input

Write a program to print all distinct permutations of a given string in sorted order. Note that the input string may contain duplicate characters. In… Read More »