Question d’entretien chez Amazon

2 coding questions. Based on data structure and algorithm.