## Longest string in an array which matches with prefix of the given string

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

- Find the first maximum length even word from a string
- Repeated Character Whose First Appearance is Leftmost
- Count common characters in two strings
- Find the longest string that can be made up of other strings from the array
- Count substrings that contain all vowels | SET 2
- Convert character array to string in C++
- Check whether two strings contain same characters in same order
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Program to find the kth character after decrypting a string
- Generate all permutations of a string that follow given constraints
- Minimum number of times A has to be repeated such that B is a substring of it
- Minimum length substring with exactly K distinct characters
- Rearrange characters in a string such that no two adjacent are same using hashing
- Maximize the happiness of the groups on the Trip
- Check if two strings are same ignoring their cases
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Print the longest prefix of the given string which is also the suffix of the same string
- Program to generate all possible valid IP addresses from given string | Set 2
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Minimum number of adjacent swaps to convert a string into its given anagram
- Minimum rotations required to get the same String | Set-2
- Find k-th character of decrypted string | Set - 2
- Minimum steps to delete a string by deleting substring comprising of same characters
- Append a digit in the end to make the number equal to the length of the remaining string
- Check if a string can be obtained by rotating another string d places
- Count of substrings which contains a given character K times
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Implement a Dictionary using Trie

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

Given a string str of lower case alphabets and a non-negative integer K. The task is to find the number of pairs of characters in… Read More »

Given two strings str1 and str2, the task is to find and print the uncommon characters of the two given strings in sorted order without… Read More »

Given a string str, the task is to count the number of ways a palindromic sub-string could be formed by concatenation of three sub-strings x,… Read More »

Given a string S consisting of character from ‘a’ to ‘z’. The task is to find the length of the largest substring of S which… Read More »

Given a string str of size N, the task is to find the sum of all ASCII values of the characters which are present at… Read More »

Given a string and a character, the task is to make a function which counts the occurrence of the given character in the string using… Read More »

Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weighted string… Read More »

This article shows how to convert a character array to a string in C++. The std::string in c++ has a lot of inbuilt functions which… Read More »

Given a tree, and the weights (in the form of strings) of all the nodes, the task is to count the nodes whose weights does… Read More »

Given two strings A, B and some queries consisting of an integer i, the task is to check whether the sub-string of A starting from… Read More »

Given two binary strings s and t. The task is to rearrange the string s in such a way that the occurrence of string t… Read More »

Given a binary string str, the task is to find the maximum length of the sub-string of str that has odd parity. A binary string… Read More »

Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More »

Given two integers N and M, the task is to print an N x M matrix such that each row and column contain all the… Read More »