Pregunta de entrevista de Amazon

Take min two element and push diff back into it.