Pyth, 1313 11 bytes
WnSQKO.pQ;K
Previous Solution
L?n.SbSbybb
y
WnSQKO.pQ;K
.pQ Generate a list of all permutations of input
KO.pQ K = random permutation in the list
WnSQK ; While(sorted(input) != K): do nothing
K print K
CompiledPrevious Solution:
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