AppsFlyer interview question

easy leetcode question with followups