46. Permutations

March 11, 2020 · View on GitHub

| English | 简体中文 |

46. Permutations

Description

Given a collection of distinct integers, return all possible permutations.

Example:

Input: [1,2,3]
Output:
[
  [1,2,3],
  [1,3,2],
  [2,1,3],
  [2,3,1],
  [3,1,2],
  [3,2,1]
]

Related Topics

  • Backtracking

Similar Questions

  • Next Permutation
  • Permutations II
  • Permutation Sequence
  • Combinations

Contents

  1. 1Description
  2. 2Related Topics
  3. 3Similar Questions