human
Check if an array can be split into K consecutive non | Function to check if array can be split into K consecutive and non - overlapping subarrays of length M consisting of a single distinct element.
Traverse over the range [ 0 , N - M - 1 ].
Check if arr [ i ] is the same as arr [ i + m ].
Increment current length t of pattern matched by 1.
Check if t is equal to m , increment count of total repeated pattern.
Return true if length of total repeated pattern is k.
Update length of the current pattern.
Update count to 1.
Finally return false if no pattern found.
Driver Code"
Solution in Python:

What is a code to check if an array can be split into K consecutive non and the other steps required?
assistant
#Here is code to check if an array can be split into K consecutive non and the other steps required.
 def checkPattern ( arr , m , k , n ) :
	count = 1
	t = 0
	for i in range ( n - m ) :
		if ( arr [ i ] == arr [ i + m ] ) :
			t += 1
			if ( t == m ) :
				t = 0
				count += 1
				if ( count == k ) :
					return " Yes "
		else :
			t = 0
			count = 1
	return " No "
if __name__ == ' _ _ main _ _ ' :
	arr = [ 6 , 1 , 3 , 3 , 3 , 3 ]
	M = 1
	K = 3
	N = len ( arr )
	print ( checkPattern ( arr , M , K , N ) )