Skip to main content
1 of 2
Scott
  • 1.1k
  • 6
  • 12

Pyth, 13 bytes

L?n.SbSbybb
y

Try it online!

Compiled to python:

assign('Q',eval_input())
@memoized
def subsets(b):
 return (subsets(b) if ne(shuffle(b),Psorted(b)) else b)
imp_print(subsets(Q))

Basically:
Shuffle the list, if it isn't equal to the sorted list:
recursively call.
Else:
Return it

Scott
  • 1.1k
  • 6
  • 12