merge k sorted array