Pergunta de entrevista da empresa CyberArk

coding question, Search in a sorted and rotated Array.