First strictly greater element in a sorted array in Java
Given a sorted array and a target value, find the first element that is strictly greater than given element. Examples: Input : arr[] = {1, 2, 3, 5, 8, 12} Target = 5 Output : 4 (Index of 8) Input : {1, 2, 3, 5, 8, 12} Target = 8 Output : 5 (Index of 12) Input : {1, 2, 3, 5, 8, 12} Target = 15 Output