Special Trees test case failing

Hi, my test case 4 is failing and i am not able to figure out why, it shows run time error, please help me to figure out the reasons

class node: def init(self,data): self.data = data self.left = None self.right = None def inorder(root): if root==None: return inorder(root.left) print(root.data,end=" ") inorder(root.right) def specialTree(arr,s,e): if s>e: return None index=s for i in range(s,e+1): if arr[i]>arr[index]: index=i root = node(arr[index]) root.left = specialTree(arr,s,index-1) root.right = specialTree(arr,index+1,e) return root if name == ‘main’: n = int(input()) arr = list(map(int,input().split())) ans = specialTree(arr,0,n-1) inorder(ans)

this is the code i have written but test case 4 is failing and i am not able to figure please help

@deepaksrawat1906, hi this is Talha shamim I’m TA of CPP but by mistake in the system i recieved your doubts you may ask it again
Sorry for the inconveniences

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.