[BangPypers] which is better solution of the question

Anand Chitipothu anandology at gmail.com
Tue Jun 16 18:35:38 CEST 2009


> 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) and complexity of second solution
is O(n^2) because it using values.index function, which is O(n).


More information about the BangPypers mailing list