Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 1.46 KB

0047-permutations-ii.adoc

File metadata and controls

70 lines (53 loc) · 1.46 KB

47. Permutations II

{leetcode}/problems/permutations-ii/[LeetCode - 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]
]

思路分析

{image_attr}
{image_attr}
{image_attr}
一刷
link:{sourcedir}/_0047_PermutationsII.java[role=include]
二刷
link:{sourcedir}/_0047_PermutationsII_2.java[role=include]
三刷
link:{sourcedir}/_0047_PermutationsII_3.java[role=include]

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