On Wed, Nov 19, 2014 at 01:05:13PM -0500, David Feuer wrote: > Many thanks. I don't *think* it's ever been as bad as O(mn) (I'm pretty > sure it's no worse than O(m log m log n) and it may well be better), Oh right, there are m appends, each O(log n).