Pregunta de entrevista de PayPal

Some random theoretical question for a coding round