Cody

# Problem 2417. all possible subsets of set

Solution 2167546

Submitted on 20 Mar 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = [1 1 1]; y ={[],[1]}; assert(isequal(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test1 (line 3) assert(isequal(your_fcn_name(x),y))

2   Fail
x=[1]; y={[],[1]}; assert(isequal(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test2 (line 3) assert(isequal(your_fcn_name(x),y))

3   Fail
x=[1 2 3]; y ={[],[1],[2],[3],[1 2],[1 3],[2 3],[1 2 3]}; assert(isequal(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test3 (line 3) assert(isequal(your_fcn_name(x),y))

4   Fail
x=[1 1 2 3]; y ={[],[1],[2],[3],[1 2],[1 3],[2 3],[1 2 3]}; assert(isequal(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test4 (line 3) assert(isequal(your_fcn_name(x),y))

5   Fail
x=[]; y={[]}; assert(isequal(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test5 (line 3) assert(isequal(your_fcn_name(x),y))

6   Fail
x=[nan nan]; % matlab considers them non-unique, but i don't y={[],[nan]}; assert(isequalwithequalnans(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test6 (line 3) assert(isequalwithequalnans(your_fcn_name(x),y))

7   Fail
x=[nan nan 1]; y={[],[nan],[1],[nan 1]}; assert(isequalwithequalnans(your_fcn_name(x),y))

Error: File: your_fcn_name.m Line: 5 Column: 1 Function 'your_fcn_name' has already been declared within this scope. Error in Test7 (line 3) assert(isequalwithequalnans(your_fcn_name(x),y))