# Category: String

## Find all N-digit numbers with equal sum of digits at even and odd index

Find all N-digit numbers with equal sum of digits at even and odd index. N varies from [1 to 9].

## Find first non-repeating character in a string by doing only one traversal of it

Given a string, find first non-repeating character in it by doing only one traversal of it.

## In-place remove all adjacent duplicates from the given string

Given a string, in-place remove all adjacent duplicates from it. The algorithm should continue removing adjacent duplicates from the string till no duplicate is present in the result.

## Find the minimum number of inversions needed to make the given expression balanced

Given an expression consisting of opening brace ‘{‘ and a closing brace ‘}’, find the minimum number of inversions needed to make the expression balanced.

## Replace all non-overlapping occurrences of the pattern

Given a C-style string and a pattern, in-place replace all non-overlapping occurrences of the pattern in the string by a specified character.

## Construct the longest palindrome by shuffling or deleting characters from a string

Write a efficient algorithm to construct the longest palindrome by shuffling or deleting characters from a given string.

## Determine if characters of a String follows a specified order or not

Given a string and a pattern (having all distinct characters), determine if characters of the string follows specific order as defined by characters of the pattern.

## Print all combinations of phrases that can be formed by picking words from each of the given lists

Given N lists of words, print all combinations of phrases that can be formed by picking one word each from each of the given lists.

## Find the longest common prefix (LCP) between given set of strings

Write an efficient algorithm to find the longest common prefix (LCP) between given set of strings.

## Find minimum operations required to transform a string into another string

Given two strings, determine if the first string can be transformed into the second string. The only operation allowed is to move any character from the first string to the front. If the string can be transformed, find the minimum number of operations required for the transformation.

## Find length of the longest balanced parenthesis in a string

Given a string consisting of opening and closing parenthesis, find the length of the longest balanced parenthesis in it.

## Determine if a string can be transformed into another string with a single edit

Given two strings, determine if the first string can be transformed into the second string with single an edit operation. An edit operation can be one of insert, remove, or replace a character in the first string.