Pregunta de entrevista de AppsFlyer

easy leetcode question with followups