Bloomberg interview question

Similar to Find in Mountain Array LC