## Count of K-size substrings having palindromic permutations

Given a string str consist of only lowercase alphabets and an integer K, the task is to count the number of substrings of size K… 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
- Print the two possible permutations from a given sequence
- Count the number of ways to fill K boxes with N distinct items
- 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 a string str consist of only lowercase alphabets and an integer K, the task is to count the number of substrings of size K… Read More »

Given an array of pairs arr[] which denotes the ranges of the elements of an array, the task is to count the distinct median of… Read More »

Given an integer N which denotes the points on the circumference of a circle, the task is to find the number of quadrilaterals formed using… Read More »

Given two arrays A and B of the same length N, filled with a permutation of natural numbers from 1 to N, the task is… Read More »

Given an array arr[] of length N, the task is to check if it can be formed by merging two permutations of same or different… Read More »

Given a number N, our task is to print those permutations of integer N which are greater than N. Examples: Input: N = 534 Output:… Read More »

Given four integers A, B, C, and D, the task is to find the number of distinct sets (X, Y, and Z) where X, Y… Read More »

Given a range in the form of L and R, and a value K, the task is to count the numbers between the range L… Read More »

Given number of orders, find the number of valid arrangements of orders where delivery of ith order is always after the pickup of ith order.Examples:… 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 three integers N, P and K, the task is to find the number of ways of painting K cells of 3 x N grid… Read More »

Given an integer N denoting the number of dices, the task is to find the probability of every possible value that can be obtained by… Read More »

Given an integer N, the task is to count every number i from 1 to N (both inclusive) such that i is a binary representation… Read More »

Given an array A[] consisting of decreasing permutation of N numbers, the task is to sort the array using triple swaps. If it is not… Read More »

Given an array arr[] of line segments on the x-axis and an integer K, the task is to calculate the number of ways to choose… Read More »