dynamic programming merge see input and output