Pregunta de entrevista de Amazon

it was Basic leet code question