Google interview question

Merge k sorted int arrays, each array containing n ints, into 1 array. And give the complexity.

Interview Answers

Anonymous

13 Jul 2012

K way merge with heap is a solution. The time complexity is nklog(k)

1

Anonymous

5 Jul 2012

Loser Tree is a solution. The time complexity is O(n*k*log(k)).