## Count of number of given string in 2D character array

Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be… Read More »

- Check whether two strings contain same characters in same order
- Count occurrences of a string that can be constructed from another given string
- Print the longest prefix of the given string which is also the suffix of the same string
- Minimum rotations required to get the same String | Set-2
- Print a number as string of 'A' and 'B' in lexicographic order
- Sort an array of strings based on the frequency of good words in them
- Find minimum length sub-array which has given sub-sequence in it
- Count number of distinct substrings of a given length
- Replace two substrings (of a string) with each other
- Longest substring of only 4's from the first N characters of the infinite string
- Find if a binary matrix exists with given row and column sums
- Find the element in the matrix generated by given rules
- Longest prefix in a string with highest frequency
- Implement a Dictionary using Trie

Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be… Read More »

You are given two string str1 and str2 of same length. In a single shift you can rotate one string (str2) by 1 element such… Read More »

Given a input string and a substring. Find the frequency of occurrences of substring in given string. Examples: Input : man (pattern) dhimanman (string) Output… Read More »

Given an alphanumeric string, find the number of times a pattern 1(0+)1 occurs in the given string. Here, (0+) signifies the presence of non empty… Read More »

In Set 1, we have discussed general approach for counting the patterns of the form 1(0+)1 where (0+) represents any non-empty consecutive sequence of 0’s.In… Read More »

A string contains patterns of the form 1(0+)1 where (0+) represents any non-empty consecutive sequence of 0’s. Count all such patterns. The patterns are allowed… Read More »

We have already discussed Bad character heuristic variation of Boyer Moore algorithm. In this article we will discuss Good Suffix heuristic for pattern searching. Just… Read More »

is_permutations() is used to check if two containers like string and vector are permutation of each other. It accepts three parameters, the first two parameters… Read More »

Given two string, in which one is pattern (Pattern) and other is searching expression. Searching expression contains ‘#’. The # works in following way: A… Read More »

Given two strings s and t. The task is to find maximum length of some prefix of the string S which occur in string t… Read More »

Given a string str that may contain one more occurrences of “AB”. Replace all occurrences of “AB” with “C” in str. Examples: Input : str… Read More »

Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text. The matching should cover… Read More »

Given a 2D grid of characters and a word, find all occurrences of given word in grid. A word can be matched in all 8… Read More »

Given an input text and an array of k words, arr[], find all occurrences of all words in the input text. Let n be the… Read More »

Background Suffix Array : A suffix array is a sorted array of all suffixes of a given string. Let the given string be “banana”. 0… Read More »