– James Aug 22 '11 at 3:23 4 @James: I am a little confused by the O(n log n) that you give: the number of permutations is n!, which is already much larger than O(n log n); so, I can't see how a solution could be O(n log n).
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.