Pergunta de entrevista da empresa Amazon

coding with 1 OOD and 1 algorithm question