Merge k sorted arrays in one single array