Question d’entretien chez Amazon

Different problems taken from hackerrank site