Adding algorithm to find the first larger element in a sorted array.