<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Oct 13, 2013 at 3:34 PM, Oscar Benjamin <span dir="ltr"><<a href="mailto:oscar.j.benjamin@gmail.com" target="_blank">oscar.j.benjamin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 13 October 2013 19:29, Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br>
> Did you read the problem?<br>
<br>
</div>I did but since you showed some code that you said you were working on<br>
I thought you'd be interested to know that it could be improved.<br></blockquote><div><br></div><div>The code solves the problem according to its specification :) (The numbers are less than 1e8.)</div><div><br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> Anyway, let's not get off topic (permutations).<br>
<br>
</div>Getting back to your proposal, I disagree that permutations should be<br>
"fixed". The current behaviour is correct. If I was asked to define a<br>
permutation I would have given definition #3 from Steven's list: a<br>
bijection from a set to itself. Formally a permutation of a collection<br>
of non-unique elements is not defined.<br>
<br>
They may also be uses for a function like the one that you proposed<br>
but I've never needed it (and I have used permutations a few times)<br>
and no one in this thread (including you) has given a use-case for<br>
this.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Oscar<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">The problem is a use-case. Did you read it? Did you try solving it?</div></div>