Pergunta de entrevista da empresa DoorDash

Two LC easy/medium questions, one LC hard dp problem