## 3-digit Osiris number

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 »

- Print all permutations of a string in Java
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Minimum number of given operations required to convert a permutation into an identity permutation
- Number of moves required to guess a permutation.
- Find the good permutation of first N natural numbers
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Check if any permutation of N equals any power of K
- Permutation of an array that has smaller values from another array
- Lexicographically smallest permutation with no digits at Original Index
- Arrangement of the characters of a word such that all vowels are at odd places
- Find the number of good permutations
- Lexicographically Smallest Permutation of length N such that for exactly K indices, a[i] > a[i] + 1
- Find a permutation of 2N numbers such that the result of given expression is exactly 2K
- Generate original array from difference between every two consecutive elements
- Find a permutation such that number of indices for which gcd(p[i], i) > 1 is exactly K
- Find permutation of n which is divisible by 3 but not divisible by 6
- 3-digit Osiris number

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 N – 1 differences between two consecutive elements of an array containing N numbers which are in range of 1 to N. The task… Read More »

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »

Given a string str, the task is to find the count of all the sub-strings of length four whose characters can be rearranged to form… 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 two integers N and K. The task is to find the number of good permutations of first N natural numbers. A permutation is called… Read More »

Given two integers N and K, the task is to find a permutation of integers from the range [1, N] such that the number of… Read More »

Given two integers N and K, the task is to find a permutation of first 2*N natural numbers such that the following equation is satisfied.… Read More »

Given an integer N. The task is to find the permutation of first N natural numbers such that the absolute difference between any two consecutive… Read More »

Given a string str, the task is to print all the permutations of str. A permutation is an arrangement of all or part of a… Read More »

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

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 two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)… Read More »

Given an integer N. The task is to find the lexicographically smallest permutation of integer of the form: 12345…N such that no digit occurs at… Read More »

Given a string ‘S’ containing vowels and consonants of lowercase English alphabets. The task is to find the number of ways in which the characters… Read More »