Domanda di colloquio di Amazon

Take min two element and push diff back into it.