On Tue, Jun 16, 2009 at 9:35 AM, Anand Chitipothu<anandol...@gmail.com> wrote:
>> The zip solution is succinct.
>>
>> Also, by the virtue of being a built-in function zip() should be
>> faster than the second approach.
>
> Complexity of first solution is O(n)

> values, items = list(zip(*sorted(zip(values,items), reverse=True)))

Must be O(n lg n) .. due to the use of 'sorted(...)'
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to