human
Absolute distinct count in a sorted array | The function returns return number of distinct absolute values among the elements of the array.
initialize count as number of elements.
Remove duplicate elements from the left of the current window ( i , j ) and also decrease the count.
Remove duplicate elements from the right of the current window ( i , j ) and also decrease the count.
break if only one element is left.
Now look for the zero sum pair in current window ( i , j ).
decrease the count if ( positive , negative ) pair is encountered.
Driver code"
Solution in Python:

=====
Write me a code to absolute distinct count in a sorted array and the other steps required?
assistant
#Here is code to absolute distinct count in a sorted array and the other steps required.
 def distinctCount ( arr , n ) :
	count = n ;
	i = 0 ; j = n - 1 ; sum = 0 ;
	while ( i < j ) :
		while ( i != j and arr [ i ] == arr [ i + 1 ] ) :
			count = count - 1 ;
			i = i + 1 ;
		while ( i != j and arr [ j ] == arr [ j - 1 ] ) :
			count = count - 1 ;
			j = j - 1 ;
		if ( i == j ) :
			break ;
		sum = arr [ i ] + arr [ j ] ;
		if ( sum == 0 ) :
			count = count - 1 ;
			i = i + 1 ;
			j = j - 1 ;
		elif ( sum < 0 ) :
			i = i + 1 ;
		else :
			j = j - 1 ;
	return count ;
arr = [ - 2 , - 1 , 0 , 1 , 1 ] ;
n = len ( arr ) ;
print ( " Count ▁ of ▁ absolute ▁ distinct ▁ values ▁ : ▁ " , distinctCount ( arr , n ) ) ;