## Find if a binary matrix exists with given row and column sums

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

- Check if a word exists in a grid or not
- 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
- Generate permutation of 1 to N such that absolute difference of consecutive numbers give K distinct integers
- Count strings that end with the given pattern
- Occurrences of a pattern in binary representation of a number
- Check if a string can be repeated to make another string
- Print a number as string of 'A' and 'B' in lexicographic order
- Replace two substrings (of a string) with each other
- Count occurrences of a sub-string with one variable character
- Longest substring of only 4's from the first N characters of the infinite string
- Count number of distinct substrings of a given length
- Weighted sum of the characters of a string in an array | Set 2
- Find if a binary matrix exists with given row and column sums
- Print n 0s and m 1s such that no two 0s and no three 1s are together
- Longest prefix in a string with highest frequency
- Find the element in the matrix generated by given rules

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

Given some rules to generate an N * N matrix mat[][] and two integers R and C, the task is to find the element at… Read More »

Given a string, we need to find the minimum number of rotations required to get the same string. In this case, we will only consider… Read More »

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… Read More »

Given two strings s1 and s2, the task is to find whether the two string contain the same characters that occur in the same order.… Read More »

Given a string S of length N consisting of lower-case English albhabets and an integer ‘l’, find the number of distinct sub-strings of length ‘l’… Read More »

Given an integer N, the task is to find the length of the longest substring containing only 4’s from the first N characters of the… Read More »

Given a string str, the task is to find the longest prefix which is also the suffix of the given string. The prefix and suffix… Read More »

Given a number N, the task is to print the string of ‘A’ and ‘B’ corresponding to that number. If we represent all numbers as… Read More »

Given 3 strings S, A and B. The task is to replace every sub-string of S equal to A with B and every sub-string of… Read More »

Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »

Given a string str consisting of only characters ‘a’ and ‘b’, the task is to check whether the string is valid or not. In a… Read More »

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 »