Frage im Vorstellungsgespräch bei Meta

Print binary search tree

Antworten zu Vorstellungsgespräch

Anonym

4. März 2015

class Tree { private Node root; public void print() { printRecursively(root); } private void printRecursively(Node node) { if (node == null) return; printRecursively(node.left); System.out.println(node.data); printRecursively(node.right); } }

Anonym

30. Apr. 2015

did they tell in which order you have to print the Binary Search tree ? ...post-order,pre-order ,in-order,level order ?