merge n sorted arrays