Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 888 Bytes

0047-permutations-ii.adoc

File metadata and controls

48 lines (35 loc) · 888 Bytes

47. Permutations II

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

Example:
Input: [1,1,2]
Output:
[
  [1,1,2],
  [1,2,1],
  [2,1,1]
]
0047 1

思考:去重剪枝的判断是怎么实现的?

参考资料

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

Example:

Input: [1,1,2]
Output:
[
  [1,1,2],
  [1,2,1],
  [2,1,1]
]
link:{sourcedir}/_0047_PermutationsII.java[role=include]