## Product of all Subsequences of size K except the minimum and maximum Elements

Given an array A[] containing N elements and an integer K. The task is to calculate the product of all elements of subsequences of size… 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 an array A[] containing N elements and an integer K. The task is to calculate the product of all elements of subsequences of size… Read More »

Given an integer array arr[] of length N and an integer K, the task is to count the number of possible arrays of length K… Read More »

Given an array arr[] which contains the frequency of the digits (0-9), the task is to find the count of numbers possible using each digit… Read More »

Given an array arr[] of N integers. The task is to count the number of sub-sequences whose sum is 0. Examples: Input: arr[] = {-1,… Read More »

Given a 3-digit number N, the task is to find if N is an Osiris number or not. Osiris numbers are the numbers that are… Read More »

Given an integer n, the task is to check if n is a Dudeney number or not. A Dudeney number is a positive integer that… Read More »

Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number… Read More »

Given an array of N integers where arr[i] denotes the number of sticks of length 2i. The task is to find the number of triangles… Read More »

Given a string S. The task is to count the non-overlapping pairs of palindromic sub-strings S1 and S2 such that the strings should be S1[L1…R1]… Read More »

Given a string str and Q queries. Each query consists of an integer K. The task is to find the number of ways of choosing… Read More »

Given an integer N, the task is to count the number of binary strings of length N having only 0’s and 1’s. Note: Since the… Read More »

Given a range [L, R], the task is to find the XOR of all the integers in the given range i.e. (L) ^ (L +… Read More »

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More »

Given an integer N, the task is to print a good permutation of first N natural numbers. Let’s denote the ith element of the permutation… Read More »

Given a number N(1<=N<=2000)., The task is to find the number strings of size N that can be obtained after using characters from 'a' to… Read More »