## Count strings that end with the given pattern

Given a pattern pat and a string array sArr[], the task is to count the number of strings from the array that ends with the… 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
- Length of the longest substring with consecutive characters
- Check if a binary string has two consecutive occurrences of one everywhere
- Count strings that end with the given pattern
- Check if a string can be repeated to make another string
- Print a number as string of 'A' and 'B' in lexicographic order
- Count number of distinct substrings of a given length
- Find minimum length sub-array which has given sub-sequence in it
- Replace two substrings (of a string) with each other
- Longest substring of only 4's from the first N characters of the infinite string
- Sort an array of strings based on the frequency of good words in them
- 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

Given a pattern pat and a string array sArr[], the task is to count the number of strings from the array that ends with the… Read More »

Given a string str of lowercase alphabets, the task is to find the length of the longest sub-string of characters in alphabetical order i.e. string… Read More »

Given two strings a and b, the task is to check how many times the string a can be repeated to generate the string b.… Read More »

Given two integers n and m where n is the number of 0s and m is the number of 1s. The task is to print… Read More »

You are given an array of strings str[], the task is to find the score of a given string s from the array. The score… Read More »

Given two strings a and b, and an integer k which is the index in b at which the character can be changed to any… Read More »

Given two integers N and K where K < N, the task is to generate a permutation of integers from 1 to N such that… Read More »

Given a 2D grid of characters and a word, the task is to check if that word exists in the grid or not. A word… Read More »

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

Given an array of integers. The task is to find the minimum number of consecutive sequences that can be formed using the elements of the… Read More »

Given two integer N and D where 1 ≤ N ≤ 1018, the task is to find the sum of all the integers from 1… Read More »

Given a string str and an integer array width[] where: width[0] = width of character ‘a’ width[1] = width of character ‘b’ … width[25] =… Read More »

Given an array arr[] having 4 integer digits only. The task is to return the maximum 24 hour time that can be formed using the… Read More »

Given a string str, the task is to find the sum of the similarities of str with each of its suffixes. The similarity of strings… Read More »

Given two binary strings and . Let be set of all the cyclic permutations of string . The task is to find how many strings… Read More »