[BangPypers] which is better solution of the question
sridhar.ratna at gmail.com
Thu Jun 18 04:44:12 CEST 2009
On Tue, Jun 16, 2009 at 9:35 AM, Anand Chitipothu<anandology at 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(...)'
More information about the BangPypers