My dynamic programming solution to the merge problem