Pergunta de entrevista da empresa Epic Games

Basic dynamic programming question, string question