Pergunta de entrevista da empresa Meta

How to traverse a binary tree in order recursively.

Resposta da entrevista

Sigiloso

30 de nov. de 2010

public void printInOrder(Node root){ if(root == null) return; if(root.left != null) printInOrder(root.left); System.our.println(" key: " + root.key); if(root.right!=null) printInOrder(root.right); } class Node{ Node left, right ,parent; int key; }

1