Back to DSA sheet

Permutations

MediumBacktracking
Open on LeetCodeAmazonGoogleMeta

Return all possible orderings of an array of distinct integers.

Constraints
  • 1 <= nums.length <= 6
  • All integers are unique
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
permutations.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.