## Maximum number of times str1 appears as a non-overlapping substring in str2

Given two strings str1 and str2, the task is to find the maximum number of times str1 occurs in str2 as a non-overlapping substring after… Read More »

- Find minimum difference between any two elements | Set 2
- Find the smallest positive number missing from an unsorted array : Hashing Implementation
- Find sum of a[i]%a[j] for all valid pairs
- Find minimum changes required in an array for it to contain k distinct elements
- Design a stack which can give maximum frequency element
- Queries to find the first non-repeating character in the sub-string of a string
- Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle
- Find the first duplicate element in the linked list
- Partiton the string in two parts such that both parts have at least k different characters
- Swap all occurrences of two characters to get lexicographically smallest string
- Minimum cost to make all array elements equal
- Minimum deletions required such that any number X will occur exactly X times
- Case-specific sorting of Strings in O(n) time and O(1) space
- Find the last non repeating character in string
- Queries to find the last non-repeating character in the sub-string of a given string
- Length of the largest substring which have character with frequency greater than or equal to half of the substring
- Frequency of a substring in a string using pthread
- Longest prefix in a string with highest frequency
- Count pairs with set bits sum equal to K
- Find the difference of count of equal elements on the right and the left for each element
- Program to parse the Molecules and get the Atoms count
- Distinct strings such that they contains given strings as sub-sequences
- Find the maximum number of elements divisible by 3
- Sort an alphanumeric string such that the positions of alphabets and numbers remain unchanged
- Map every character of one string to another such that all occurrences are mapped to the same character
- Find the maximum length of the prefix
- Find the number of occurrences of a character upto preceding position
- Print characters in decreasing order of frequency
- XOR of elements in an array having prime frequency
- Queries for the difference between the count of composite and prime numbers in a given range

Given two strings str1 and str2, the task is to find the maximum number of times str1 occurs in str2 as a non-overlapping substring after… Read More »

Given a string S of length N containing only lower case letters. Also, given Q queries where each query consists of an integer P such… Read More »

Given a string str, the task is to print the characters in decreasing order of their frequency. If the frequency of two characters is same… Read More »

Given a string str of lowercase characters, the task is to find the minimum number of characters that need to added to the string in… Read More »

Given two strings str1 and str2, the task is to check whether both of the string can be made equal by copying any character of… Read More »

Given an array arr[] of N elements, the task is to find the XOR of the elements which appear odd number of times in the… Read More »

Given an array arr[] consisting of N positive integers, the task is to make all values of this array equal to some integer value with… Read More »

Given an array arr[] of N elements, the task is to find the xor of the elements which have prime frequencies in the array. Note… Read More »

Given an array arr[] of N integers representing the heights of the sticks. The task is to find the area of the largest square that… Read More »

Given an array arr of size N and a number K. The task is to find the minimum elements to be replaced in the array… Read More »

Given a chemical formula as a string, the task is to get the count of atoms in this chemical formula. Examples: Input: str = “Fe2H3OH”… Read More »

Given an input string and a substring. Find the frequency of occurrences of a substring in the given string using pthreads. Examples: Input: string =… Read More »

Given N bottles. The ith bottle has A[i] radius. Once a bottle is enclosed inside another bottle, it ceases to be visible. The task is… Read More »

Given an array arr[] of size N. The task is to find the sum of arr[i] % arr[j] for all valid pairs. Answer can be… Read More »

Given an array arr[] of size N. The task is to find X – Y for each of the element where X is the count… Read More »