Guest User

Untitled

a guest
Nov 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. list<X> permute( list<X> x ) { list<X> r; while (!x.empty()) { auto i = random_upto(x.size()); r.insert(x[i]); x.erase(i); } return r; }
  2.  
  3. list<X> permute( list<X> x ) { list<X> r; while (!x.empty()) { auto i = random_upto(x.size()); r.insert(x[i]); x.erase(i); } return r; }
Add Comment
Please, Sign In to add comment