Implemented merge of K sorted arrays