Javascript backtrack
\n/**\n * @param {number[]} nums\n * @return {number[][]}\n */\nvar subsetsWithDup = function(nums) {\n    function findSubset(arr,curr){\n        res.push([...
```\n/**\n * @param {number[]} nums\n * @return {number[][]}\n */\nvar subsetsWithDup = function(nums) {\n    function findSubset(arr,curr){\n        res.push([...curr])\n        for(let i=0;i<arr.length;i++){\n            if(i== 0 || arr[i] != arr[i-1]){\n                curr.push(arr[i])\n                findSubset(arr.slice(i+1),curr)\n                curr.pop()\n            }\n        }\n    }\n    let res = []\n    nums.sort((a,b)=>{return a-b})\n    findSubset(nums,[])\n    return res\n};\n```
['Backtracking', 'JavaScript']