Juniper Networks interview question

Write the complete code implementation of the In-order traversal.

Interview Answers

Anonymous

Feb 20, 2016

public static void inporder(Node root) { if(root.left!=null) inorder(root.left); System.out.println(root.data); if(root.right!=null) inorder(root.left); }

Anonymous

Feb 20, 2016

0 ▼ public static void inporder(Node root) { if(root.left!=null) inorder(root.left); System.out.println(root.data); if(root.right!=null) inorder(root.right); }