Pregunta de entrevista de Google

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

Respuestas de entrevistas

Anónimo

13 jul 2012

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

1

Anónimo

5 jul 2012

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