Pregunta de entrevista de Skyscanner

Standard algorithm questins, fairly straightforward (leetcode easy)