Question d’entretien chez Amazon

A typical medium level algorithm you’d find on LeetCode or Hackerrank.