Pregunta de entrevista de Amazon

design algorithm and code in real time with reviewer.