implemented P629 - merging sorted arrays. Used and implemented a heap for handling the merge.