Question d’entretien chez Airbnb

Leetcode binary search style question with a mathematical twist