merge k sorted arrays