Merge K sorted arrays