Pergunta de entrevista da empresa Coupang

coding question was related to dynamic programming