Pergunta de entrevista da empresa Lowe's Home Improvement

dynamic Programming with segment tree