## Find the number of p-sided squares in a grid with K blacks painted

Given a grid of size H*W with all cells initially white. Given N pairs (i, j) in an array, for each pair, paint cell (i,… Read More »

- Count pairs in array whose sum is divisible by K
- Find minimum difference between any two elements | Set 2
- Minimum cost to modify a string
- Count sub-arrays whose product is divisible by k
- Queries to check if string B exists as substring in string A
- Count of pairs of strings which differ in exactly one position
- Count number of distinct substrings of a given length
- Count all elements in the array which appears at least K times after their first occurrence
- Sum of all odd frequency nodes of the Linked List
- Number of subarrays having sum of the form k^m, m >= 0
- Find the number of p-sided squares in a grid with K blacks painted
- Maximize the number of sum pairs which are divisible by K
- Count number of pairs in array having sum divisible by K | SET 2
- Rearrange given string to maximize the occurrence of string t
- Total distinct pairs of ugly numbers from two arrays
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Number of pairs from the first N natural numbers whose sum is divisible by K
- Print all the sum pairs which occur maximum number of times
- Maximum count of pairs which generate the same sum
- Number of times the given string occurs in the array in the range [l, r]
- Count pairs with average present in the same array
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Total character pairs from two strings, with equal number of set bits in their ascii value
- Check if a given number divides the sum of the factorials of its digits
- Total distinct pairs from two arrays such that second number can be obtained by inverting bits of first
- Kotlin Hashmap

Given a grid of size H*W with all cells initially white. Given N pairs (i, j) in an array, for each pair, paint cell (i,… Read More »

Given an array A[] and positive integer K, the task is to count the total number of pairs in the array whose sum is divisible… Read More »

Kotlin HashMap is a collection which contains pairs of object. Kotlin Hash Table based implementation of the MutableMap interface. It stores the data in the… Read More »

Given an unsorted array arr[] of size n, the task is to find the minimum difference between any pair in the given array. Input: arr[]… 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 two strings A, B and some queries consisting of an integer i, the task is to check whether the sub-string of A starting from… Read More »

Given two binary strings s and t. The task is to rearrange the string s in such a way that the occurrence of string t… Read More »

Given a linked list, the task is to find the sum of all the odd frequency nodes from the given linked list. Examples: Input: 8… Read More »

Given an array arr[] of N integers where |arr[i] ≤ 1000| for all valid i. The task is to count the pairs of integers from… Read More »

Given two arrays a[] and b[], the task is to count the pairs (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number.Note that… Read More »

Given a string str consisting of lower case alphabets only and an integer K. The task is to find the minimum cost to modify the… Read More »

Given an array of strings arr[] and two integers l and r, the task is to find the number of times the given string str… Read More »

Given two arrays arr1[] and arr2[], the task is to take an element from first array (say a) and one element from second array (say… Read More »

Given an integer N, the task is to check whether N divides the sum of the factorials of its digits. Examples: Input: N = 19… Read More »

Given an array arr[] of strings of equal lengths. The task is to calculate the total number of pairs of strings which differ in exactly… Read More »