Which traversal algorithm is used to visit all nodes of a binary tree in a specific order?

  • In-order
  • Level-order
  • Post-order
  • Pre-order
Pre-order traversal is used to visit all nodes of a binary tree in a specific order. In this traversal, the nodes are visited in the order of root, left subtree, and then right subtree, making it useful for certain operations like copying a tree.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *