Pregunta de entrevista de Level AI

Basic binary search question (not on leetcode).