human
Minimum number of steps required to reach origin from a given point | function to find the minimum moves required to reach origin from ( a , b ).
Stores the minimum number of moves.
Check if the absolute difference is 1 or 0.
Store the minimum of a , b.
Store the maximum of a , b.
Prthe answer.
Driver Code.
Given co - ordinates.
Function Call"
Solution in Python:

Give me a code to minimum number of steps required to reach origin from a given point and the other steps required?
assistant
#Here is code to minimum number of steps required to reach origin from a given point and the other steps required.
 def findMinMoves ( a , b ) :
	ans = 0
	if ( a == b or abs ( a - b ) == 1 ) :
		ans = a + b
	else :
		k = min ( a , b )
		j = max ( a , b )
		ans = 2 * k + 2 * ( j - k ) - 1
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	a , b = 3 , 5
	findMinMoves ( a , b )