Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

traversing a tree in python

"""Inorder Traversing"""
def inorder_traversing(self, root):
  res = []
  if root:
    res = self.inorder_traversing(root.left)
    res.append(root.data)
    res = res + inorder_traversing(root.right)
   return res
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #traversing #tree #python
ADD COMMENT
Topic
Name
5+3 =