Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/neetcode-gh/leetcode
/ subsetsWithDup
Function
subsetsWithDup
javascript/0090-subsets-ii.js:7–11 ·
view source on GitHub ↗
(nums)
Source
from the content-addressed store, hash-verified
5
* @
return
{number[][]}
6
*/
7
var
subsetsWithDup =
function
(nums) {
8
nums.sort((a, b) => a - b);
9
10
return
dfs(nums);
11
};
12
13
const
dfs = (nums, index = 0, set = [], subset = []) => {
14
subset.push(set.slice());
Callers
nothing calls this directly
Calls
2
dfs
Function · 0.70
bfs
Function · 0.70
Tested by
no test coverage detected