## Number of substrings with length divisible by the number of 1’s in it

Given a binary string S consisting of only 0’s and 1’s. Count the number of substrings of this string such that length of substring is… Read More »

- Minimize the maximum difference between adjacent elements in an array
- Number of pairs in an array with the sum greater than 0
- Minimum salary hike for each employee such that no employee feels unfair
- Extended Knapsack Problem
- Number of containers that can be filled in the given time
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Huffman Coding using Priority Queue
- Shortest path in a directed graph by Dijkstra’s algorithm
- Find lexicographically smallest string in at most one swaps
- Find the Mth element of the Array after K left rotations
- Why Prim’s and Kruskal's MST algorithm fails for Directed Graph?
- Frequency of maximum occurring subsequence in given string
- Sum of all subarrays of size K
- Count subarrays having sum of elements at even and odd positions equal
- Maximum size of square such that all submatrices of that size have sum less than K
- Longest increasing sub-sequence formed by concatenating array to itself N times
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Count the elements having frequency equals to its value
- Count of N digit Numbers whose sum of every K consecutive digits is equal
- Lexicographical smallest number after at most K consecutive swaps
- Construct an Array of Strings having Longest Common Prefix specified by the given Array
- Maximum Possible Rating of a Coding Contest
- Proof that traveling salesman problem is NP Hard
- C++ Program for the Fractional Knapsack Problem
- Count number of triangles possible for the given sides range
- Find relative rank of each element in array
- Maximum sum subarray of size range [L, R]
- Minimum cost to make an Array a permutation of first N natural numbers
- Count of all unique substrings with non-repeating characters
- Find the maximum sum (a+b) for a given input integer N satisfying the given condition

Given a binary string S consisting of only 0’s and 1’s. Count the number of substrings of this string such that length of substring is… Read More »

Given an array a[] and an integer k, find the number of elements x in this array such that the sum of x and k… Read More »

Given an array arr[] of length n and a positive integer K, we have to find a subarray of length K which has maximum peak… Read More »

Given an integer N, the task is to find the largest number smaller than N having the maximum number of set bits. Examples: Input :… Read More »

Given an integer N and the task is to find the size of the largest group in a range 1 to N, where two numbers… Read More »

Given a string P consisting of small English letters and a 26-digit bit string Q, where 1 represent special character and 0 represent normal character… Read More »

Given two integers N and K. The task is to find the string of length N, such that each substring of length greater than equal… Read More »

Given a number X, find the Smallest Number, which is greater than 1, that divides XX. In the given question, X is always presumed to… Read More »

Given an array A[] and an integer X. Find the number of unordered triplets (i, j, k) such that A[i] < A[j] < A[k] and… Read More »

Given a string str and an integer K, the task is to check if it is possible to make the string K palindromes using all… Read More »

Given an integer N, the task is to check if it can be expressed as a product of exactly K prime divisors. Examples: Input: N… Read More »

Given an integer N which represents the size of a boolean array which is initially filled with 0, and also given an array arr[] of… Read More »

Given an integer N, the task is to find the number of groups having the largest size. Each number from 1 to N is grouped… Read More »

Given an array arr[] of N integers and a number K. The task is to count the number of subarray with exactly K Prime Numbers.… Read More »

Given an array of integers arr[] of size N, the task is to count all the elements of the array which have a frequency equals… Read More »