Question d’entretien chez SAP

Search in a sorted array, question directly from Leetcode