## Count of ways to select K consecutive empty cells from a given Matrix

Given a binary matrix V[][] of dimensions N * M, wherein each cell is either empty or blocked marked by a 0 and 1 respectively,… Read More »

- Number of ways to write N as a sum of K non-negative integers
- Sum of all subsequences of length K
- Count of distinct XORs formed by rearranging two Binary strings
- Number of ways to color N-K blocks using given operation
- Count of K length subsequence whose product is even
- Count of subsequences which consists exactly K prime numbers
- Find the Nth row in Pascal's Triangle

Given a binary matrix V[][] of dimensions N * M, wherein each cell is either empty or blocked marked by a 0 and 1 respectively,… Read More »

Given an array arr[] positive integers, the task is to find the number of ways to convert the array sum even if we are allowed… Read More »

Given N number of people, the task is to count the number of ways to form groups of size ≤ N where, in each group,… Read More »

Given an integer N, the task is to find the total number of ways to distribute N among 3 people such that: Exactly one person… Read More »

Given two integers A and B, representing the count of objects of two different types, and another integer N which represents the number of shelves,… Read More »

Given four positive integers M, N, X, and Y, the task is to count all the possible ways to reach from top left(i.e., (0, 0))… Read More »

Given N teams and the results of round-robin tournament in which no match resulted is draw or tie. The task is to find the order… Read More »

Given a string S, the task is to count all substrings which contains only vowels. Examples: Input: S = “geeksforgeeks” Output: 7 Explanation: Substrings {“e”,… Read More »

Given an integer array arr[] and an integer K, the task is to count all triplets whose GCD is equal to K. Examples: Input: arr[]… Read More »

Given a non-negative integer N, the task is to find the Nth row of Pascal’s Triangle. Note: The row index starts from 0. Pascal’s Triangle:… Read More »

Given an array arr[]and an integer K, the task is to find the sum of all K length subsequences from the given array. Example: Input:… Read More »

Given an integer K and an array arr[], the task is to find the number of subsequences from the given array such that each subsequence… Read More »

Given an array arr[] and an integer K, the task is to find number of non empty subsequence of length K from the given array… Read More »

Given two positive integers N and K, the task is to count the number of ways to write N as a sum of K non-negative… Read More »

Given N blocks out of which K are colored. These K colored blocks are denoted by an array arr[]. The task is to count the… Read More »