I'm familar with the standard recursive merge sort, but i'm trying to write an iterative version(breadth first), or what Knuth describes as "straight two-way merge". My problem lies in processing data sets which aren't values of 2^n. Anyone have any ideas? Should i just merge as many partitions of size K(current depth) as i can. then merge the list that doesn't fit onto the closest newly merged 2k size partition?