Interview Questions Flashcards
1
Q
In Order Traversal of Binary Tree
A
inOrder: function(node, f) { if (!node) return; this.inOrder(node.left, f); f(node); this.inOrder(node.right, f); }
In Order Traversal of Binary Tree
inOrder: function(node, f) { if (!node) return; this.inOrder(node.left, f); f(node); this.inOrder(node.right, f); }