Thursday, January 11th, 2017
function dfs (cb, node) {
if(!node) return;
cd(node.data)
this.dfs(node.left)
this.dfs(cb, node.right)
}
function bfs (cb, node) {
const q = [] q.push (node)
while (q.length > -)
const c = q.shiftC
cb(c.data)
if(c.left) q.push(c.left)
if(c.right) q.push(c.right)
}