MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / makeSubsets

Method makeSubsets

Backtracking/subsets.py:41–48  ·  view source on GitHub ↗
(index, current_subsets)

Source from the content-addressed store, hash-verified

39 length = len(nums)
40
41 def makeSubsets(index, current_subsets):
42 if index == length:
43 return
44
45 result.append(current_subsets+[nums[index]])
46
47 makeSubsets(index+1, current_subsets+[nums[index]])
48 makeSubsets(index+1, current_subsets)
49
50
51 makeSubsets(0, [])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected