Skip to main content

Permutations

This page provides links to solutions that use the combinations.

Overview

Permutations, refer to the selection and arrangements of items from larger group, where the order matters. The formula for calculating permutation is as below:

nPr=n!(nr)!^\text{n}\text{P}_\text{r} = \frac{\text{n}!}{(\text{n}−\text{r})!}

Where n\text{n} is the total number of items, and r\text{r} is the number of items to arrange.

How to Spot These Problems

You can identify permutation problems if the problem requires you to:

  • Generate all possible arrangements of a set or subset where the order of items matters.

Leetcode Problem Set

# Solution
1879Minimum XOR Sum of Two Arrays
Total Solved: 1