Pergunta de entrevista da empresa Amazon

They asked a coding question about two pointers and dynamic programming