Domanda di colloquio di PayPal

Some random theoretical question for a coding round