Question d’entretien chez Amazon

coding questions, time complexity , approach to the problem