Needed help in finding time complexity

I am unable to guess the time complexity of the following code and please share your thought process like how do you guess the time complexity of this kind of code.In my case i am always unable to guess the time complexity of this type of code.please help me.

if I read it correctly it is O(1)
No matter what a or b is, after at most 2 recursive calls one will be divisible by 3. This is about equal to 3 if-statements.

1 Like

Thank you.I got it now.