GalaxEye Space interview question

Asked me a question on dynamic programming