## Number of moves required to guess a permutation.

Given an integer N and there is a hidden permutation (of numbers from 1 to N, each occurring exactly once) that you need to guess.… 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 an integer N and there is a hidden permutation (of numbers from 1 to N, each occurring exactly once) that you need to guess.… Read More »

Given an array arr[] of integer elements, the task is to find the total number of sub-sets of arr[] in which product of the elements… Read More »

Given a number N(less than 10^9). The task is to print all the numbers less than N which are having a maximum of 2 unique… Read More »

Given an integer n and an array of characters S, the task is to generate Lyndon words of length n having characters from S. A… Read More »

Given an array arr of N integers, the task is to split the elements of the array into N/2 pairs (each pair having 2 elements)… Read More »

Given the number of questions as , and marks for the correct answer as and marks for the incorrect answer. One can either attempt to… Read More »

Given M unique digits and a number N. The task is to find the number of N-digit numbers which can be formed from the given… Read More »

Given three integers m, n and k that store the number of points on lines l1, l2 and l3 respectively that do not intersect. The… Read More »

Given a word containing vowels and consonants. The task is to find that in how many different ways word can be arranged so that the… Read More »

Given four integers n, w, m and k where, m is the total number of men. w is the total number of women. n is… Read More »

You are given n straight lines. You have to find maximum number of point of intersection with these n lines. Examples: Input : n =… Read More »

We have an integer N. We need to express N as a sum of K integers such that by adding some(or all) of these integers… Read More »

Given an array of n positive numbers, the task is to count number of ordered pairs with even and odd sum. Examples: Input: arr[] =… Read More »

Given an array of N elements. The task is to count unordered pairs (i, j) in the array such that the product of a[i] and… Read More »

Given a number N. The task is to count the all possible values of x such that nx is equal to (N-x), where denotes bitwise… Read More »