{
  "type": "code_options",
  "author": "https://github.com/qiyuangong/leetcode",
  "source": "solution.md",
  "exercise_id": "90285104c9554381b189cbea114cada2",
  "keywords": "数组,回溯",
  "title": "全排列",
  "desc": [
    {
      "content": "\n<p>给定一个<strong> 没有重复</strong> 数字的序列，返回其所有可能的全排列。</p><p><strong>示例:</strong></p><pre><strong>输入:</strong> [1,2,3]<strong><br />输出:</strong>[  [1,2,3],  [1,3,2],  [2,1,3],  [2,3,1],  [3,1,2],  [3,2,1]]</pre>",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "python"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "python"
      }
    ],
    [
      {
        "content": "",
        "language": "python"
      }
    ],
    [
      {
        "content": "",
        "language": "python"
      }
    ]
  ],
  "template": {
    "content": "class Solution:\n\t def permute(self, nums):\n\t\t\te=[]\n\t\t\tif(len(nums)==1):\n\t\t\t\treturn [nums]\n\t\t\tfor i in range(len(nums)):\n\t\t\t\tq=self.permute(nums[:i]+nums[i+1:])\n\t\t\t\tfor c in q:\n\t\t\t\t\te.append([nums[i]]+c)\n\t\t\treturn e\n# %%\ns = Solution()\nprint(s.permute(nums = [1,2,3]))",
    "language": "python"
  },
  "node_id": "dailycode-fdb0c6ff79bb497cbb659d0c0cd3aa0e",
  "license": "csdn.net",
  "created_at": 1637894159,
  "topic_link": "https://bbs.csdn.net/topics/600469820"
}