Pregunta de entrevista de eBay

leetcode easy/medium array question with binary search.