Answers for "tree traversal algorithms python"

0

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
Posted by: Guest on April-01-2020

Python Answers by Framework

Browse Popular Code Answers by Language