Function to find the valley elements in the array which contains in the subarrays of the size K
void minpoint ( int arr [ ] , int n , int k ) { int min_point = 0 ; for ( int i = 1 ; i < k - 1 ; i ++ ) {