## 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 »

- Find minimum difference between any two elements | Set 2
- Minimum cost to modify a string
- Queries to check if string B exists as substring in string A
- Count number of distinct substrings of a given length
- Count number of pairs in array having sum divisible by K | SET 2
- Sum of all odd frequency nodes of the Linked List
- Find the number of p-sided squares in a grid with K blacks painted
- Rearrange given string to maximize the occurrence of string t
- Number of times the given string occurs in the array in the range [l, r]
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Count pairs with average present in the same array
- 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 »