Interview Bootcamp
Ask Author
Back to course home

0% completed

Vote For New Content
I did not sort the input array, but submission succeeded.

ahonliu

Jul 12, 2024

Please add a test case for it.

0

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

Can you please paste your code here?

Ali Sharif
Ali Sharifa year ago
class Solution: def findSubsets(self, nums): subsets = [] subsets.append([]) for number in nums: n = len(subsets) for i in range(n): s = list(subsets[i]) s.append(number) if s not in subsets: su...
Ali Sharif
Ali Sharifa year ago

Here is an example test case it does not pass: [4,4,4,1,4]