## Count of ways to generate a Matrix with product of each row and column as 1 or -1

Given two integers N and M, the task is to find the numbers of ways to form a matrix of size N * M consisting… Read More »

- Sum of GCD of all possible sequences
- Longest permutation subsequence in a given array
- Number of ways to write N as a sum of K non-negative integers
- Probability of getting K heads in N coin tosses
- Total number of BSTs using array elements
- Sum of all subsequences of length K
- Count ways to reach the Nth stair using multiple 1 or 2 steps and a single step 3
- Count rotations which are divisible by 10
- Number of pairs such that path between pairs has the two vertices A and B
- Number of subsets with same AND, OR and XOR values in an Array
- Count numbers in a range with digit sum divisible by K having first and last digit different
- Count number of triangles possible for the given sides range
- Count numbers less than N containing digits from the given set : Digit DP
- Number of ways to place two queens on a N*N chess-board
- Count of Binary strings of length N having atmost M consecutive 1s or 0s alternatively exactly K times
- Find the Number of Permutations that satisfy the given condition in an array
- Count numbers with exactly K non-zero digits and distinct odd digit sum
- Count of distinct XORs formed by rearranging two Binary strings
- Total number of Subsets of size at most K
- Count the numbers with N digits and whose suffix is divisible by K
- Number of ways to color N-K blocks using given operation
- Count the number of ways to fill K boxes with N distinct items
- Print the two possible permutations from a given sequence
- Count of common subarrays in two different permutations of 1 to N
- Find sum of xor of all unordered triplets of the array
- Count of K-size substrings having palindromic permutations
- Product of all sorted subsets of size K using elements whose index divide K completely
- Maximum number of strings that can be formed with given zeros and ones
- Sort decreasing permutation of N using triple swaps
- Print all permutations of a number N greater than itself

Given two integers N and M, the task is to find the numbers of ways to form a matrix of size N * M consisting… Read More »

Given two integers N and K, the task is to find the count of N-digit numbers such that the absolute difference of adjacent digits in… Read More »

Given an array arr[] having N integers and an integer K, the task is to select K elements from the given array such that sum… Read More »

Given two integers N and K, the task is to count the numbers up to N digits such that no two zeros are adjacents and… Read More »

Given a string str and an array arr[] of K characters, the task is to find the number of substrings of str that contains characters… Read More »

Given two arrays A[] and B[], each of size N, and two integers X and Y denoting the maximum number of elements that can be… Read More »

Given two integer N and K, the task is to find the number of sequence of length K consisting of values from the range [1,… Read More »

Given an integer N, the task is to print the number of binary strings of length N which at least one ‘1’. Examples: Input: 2… 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 a string str that represents a number. The task is to find all possible ways to split the given string such that each segment… Read More »

Given a natural number n, find the sum of sum-series of first N natural number. Sum-Series: is sum of first N natural numbers, i.e, sum-series… 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 an integer matrix mat [ ][ ] dimensions, the task is to find the largest possible square matrix from the given matrix with maximum… Read More »