AppLovin Interview Question

Had a leetcode medium problem