Google Interview Question

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

Interview Answers

Anonymous

Jul 13, 2012

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

1

Anonymous

Jul 5, 2012

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