## Splitting a Numeric String

Given a numeric string (length <= 32), split it into two or more integers( if possible), such that 1) Difference between current and previous number… Read More »

- Check whether two strings contain same characters in same order
- Implement a Dictionary using Trie
- Minimum rotations required to get the same String | Set-2
- Sort an array of strings based on the frequency of good words in them
- Count number of distinct substrings of a given length
- Find minimum length sub-array which has given sub-sequence in it
- 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
- Longest prefix in a string with highest frequency
- Minimum given operations required to convert a given binary string to all 1's
- Find the element in the matrix generated by given rules

Given a numeric string (length <= 32), split it into two or more integers( if possible), such that 1) Difference between current and previous number… Read More »

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 »