Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 400 Bytes

File metadata and controls

15 lines (11 loc) · 400 Bytes

Problem 16: The Unique Permutation Generator (Permutations II)

Problem Statement

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.

Input Format

  • An array of integers nums.

Constraints

  • 1 <= nums.length <= 8
  • -10 <= nums[i] <= 10

Example

Input: nums = [1,1,2]
Output: [[1,1,2],[1,2,1],[2,1,1]]