Pergunta de entrevista da empresa Databricks

Three dynamic programming and backtracing problem