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 ] ) ;