human
Count Strictly Increasing Subarrays | Python3 program to count number of strictlyincreasing subarrays in O ( n ) time ..
Initialize result.
Initialize length of current increasing subarray.
Traverse through the array.
If arr [ i + 1 ] is greater than arr [ i ] , then increment length.
Else Update count and reset length.
If last length is more than 1.
Driver program"
Solution in Python:
 ... Write me a code to count Strictly Increasing Subarrays and the other steps required?
assistant
#Here is code to count Strictly Increasing Subarrays and the other steps required.
 def countIncreasing ( arr , n ) :
	cnt = 0
	len = 1
	for i in range ( 0 , n - 1 ) :
		if arr [ i + 1 ] > arr [ i ] :
			len += 1
		else :
			cnt += ( ( ( len - 1 ) * len ) / 2 )
			len = 1
	if len > 1 :
		cnt += ( ( ( len - 1 ) * len ) / 2 )
	return cnt
arr = [ 1 , 2 , 2 , 4 ]
n = len ( arr )
print ( " Count ▁ of ▁ strictly ▁ increasing ▁ subarrays ▁ is " , int ( countIncreasing ( arr , n ) ) )