human
Check if the given string is linear or not | Function to check if the given is linear or not.
Iterate over string.
If character is not same as the first character then return false.
Increment the tmp.
Driver Code.
Given String str.
Function call"
Solution in Python:
 ... Write me a code to check if the given string is linear or not and the other steps required?
assistant
#Here is code to check if the given string is linear or not and the other steps required.
 def is_linear ( s ) :
	tmp = 0
	first = s [ 0 ]
	pos = 0
	while pos < len ( s ) :
		if ( s [ pos ] != first ) :
			return False
		tmp += 1
		pos += tmp
	return True
if __name__ == ' _ _ main _ _ ' :
	str = " aapaxyayziabcde "
	if ( is_linear ( str ) ) :
		print ( " Yes " )
	else :
		print ( " No " )