xxxxxxxxxx
84
var assert = require('assert');
function Node(val) {
this.val = val;
this.left = this.right = null;
}
function bottomLeftNodeVal(root) {
// Fill in this method
return root;
}
// const root = new Node(4);
// root.left = new Node(1);
// root.right = new Node(3);
// root.right.left = new Node(5);
// root.right.right = new Node(9);
// console.log(bottomLeftNodeVal(root));
function Node(val) {
this.val = val;
this.left = null;
this.right = null;
}
// Regular binary trees
OUTPUT
Results will appear here.