C ++ program to find first element that is strictly greater than given target .
#include <iostream> NEW_LINE using namespace std ; int next ( int arr [ ] , int target , int end ) { int start = 0 ; int ans = -1 ; while ( start <= end ) { int mid = ( start + end ) / 2 ;