## Count of matrices (of different orders) with given number of elements

Given a number N denotes the total number of elements in a matrix, the task is to print all possible order of matrix. An order… Read More »

- Java Program to print distinct permutations of a string
- Generating Lyndon words of length n
- Number of unique pairs in an array
- Sum of all Submatrices of a Given Matrix
- Count of Numbers in Range where first digit is equal to last digit of the number
- Count of sub-sets of size n with total element sum divisible by 3
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Number of triangles that can be formed with given N points
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Total number of subsets in which the product of the elements is even
- Count of Numbers in a Range where digit d occurs exactly K times
- K length words that can be formed from given characters without repetition
- Count of Numbers in Range where the number does not contain more than K non zero digits
- Count the number of special permutations
- Permutations of string such that no two vowels are adjacent
- Number of permutations of a string in which all the occurrences of a given character occurs together
- Ways to paint N paintings such that adjacent paintings don't have same colors
- Number of trailing zeroes in base 16 representation of N!
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Count pairs in an array such that LCM(arr[i], arr[j]) > min(arr[i],arr[j])
- Number of moves required to guess a permutation.
- Minimum and Maximum number of pairs in m teams of n people
- Python program to get all subsets of given size of a set
- Minimum numbers needed to express every integer below N as a sum
- Count ordered pairs of positive numbers such that their sum is S and XOR is K
- Ways to form n/2 pairs such that difference of pairs is minimum
- Count sub-sets that satisfy the given condition
- Maximum points of intersection n lines
- Ways to divide a binary array into sub-arrays such that each sub-array contains exactly one 1
- Number of ways to arrange a word such that all vowels occur together

Given a number N denotes the total number of elements in a matrix, the task is to print all possible order of matrix. An order… Read More »

Given a string with duplicate characters allowed, print first n permutations of given string such that no permutation is repeated. Examples: Input : string =… Read More »

Given a string str consisting only of lowercase English alphabets, the task is to count the number of ways to remove exactly one sub-string from… Read More »

Given a range represented by two positive integers l and r and two integers d and m. Find the count of numbers lying in the… Read More »

Given a string consisting of vowels and consonants. The task is to find the number of ways in which the characters of the string can… Read More »

Given a range represented by two positive integers L and R and a positive integer K. Find the count of numbers in the range where… Read More »

Given two positive integers L and R which represents a range and two more positive integers d and K. The task is to find the… Read More »

Given a string str which contains only the characters x and y, the task is to count all the sub-strings that start and end with… Read More »

Given a range represented by two positive integers L and R. Find the count of numbers in the range where the first digit is equal… Read More »

Given an array arr[], the task is to find the count of pairs from the array such that LCM(arr[i], arr[j]) > min(arr[i], arr[j]) Note: Pairs… Read More »

Given an array arr[] and an integer x, the task is to count the number of sub-sets of arr[] sum of all of whose sub-sets… Read More »

Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a… Read More »

Given an array of N positive elements find the number of quadruple, (i, j, k, m) such that i < j < k < m… Read More »

There are people which are to be grouped into exactly teams such that there is at least one person in each team. All members of… Read More »

Given X and Y coordinates of N points on a Cartesian plane. The task is to find the number of possible triangles with the non-zero… Read More »