dailycodingproblems/find_least_positive_integer_missing.cpp
/* Utility function that puts all 
non-positive (0 and negative) numbers on left 
side of arr[] and return count of such numbers */
Utility function that puts all
non-positive (0 and negative) numbers on left
side of arr[] and return count of such numbers
Utility function that puts all non - positive ( 0 and negative ) numbers on left side of arr [] and return count of such numbers
int segregate(int arr[], int size) 
{ 
	int j = 0, i; 
	for (i = 0; i < size; i++) { 
		if (arr[i] <= 0) { 
			swap(&arr[i], &arr[j]); 
			j++; 
		} 
	} 
	return j; 
}
int segregate ( int arr [ ] , int size ) { int j = 0 , i ; for ( i = 0 ; i < size ; i ++ ) { if ( arr [ i ] <= 0 ) { swap ( & arr [ i ] , & arr [ j ] ) ; j ++ ; } } return j ; }
Utility function that puts all
non-positive (0 and negative) numbers on left
side of arr[] and return count of such numbers
Utility function that puts all non - positive ( 0 and negative ) numbers on left side of arr [] and return count of such numbers
// increment count of non-positive integers 