On Fri, Jun 17, 2011 at 3:48 PM, Chris Torek <nos...@torek.net> wrote: > If len(large_list) is m, this is O(m). Inserting each item in > the "right place" would be O(m log (n + m)). But we still > have to sort: > > a.sort() > > This is O(log (n + m)), hence likely better than repeatedly inserting > in the correct place.
Surely you mean O((n + m) log (n + m)). -- http://mail.python.org/mailman/listinfo/python-list