Question d’entretien chez Amazon

SWE leetcode question around easy-medium difficultly.