@njit
def list_inorder(node):
 out = []
 done = False
 current = node
 stack = None
 while (not done):
  if (current is not None):
   stack = push(stack, current)
   current = current.left
  elif (stack is not None):
   tos = stack.data
   out.append(tos.data)
   stack = pop(stack)
   current = tos.right
  else:
   done = True
 return out

@ njit def list_inorder ( node ) : out = [ ] done = False current = node stack = None while ( not done ) : if ( current is not None ) : stack = push ( stack , current ) current = current . left elif ( stack is not None ) : tos = stack . data out . append ( tos . data ) stack = pop ( stack ) current = tos . right else : done = True return out
returns a list of the data by inorder traversing the tree .