Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx90
var assert = require('assert');function TreeNode(val) { this.val = val this.left = null this.right = null}function columnNodesBinaryTree(root) { // add your code here return;}try { let root = new TreeNode(3); root.left = new TreeNode(9); root.right = new TreeNode(20); root.right.left = new TreeNode(15); root.right.right = new TreeNode(7); assert.deepEqual(columnNodesBinaryTree(root), [ [9], [3, 15], [20], [7] ]); console.log('PASSED: ' + "columnNodesBinaryTree([3, 9, 20, null, null, 15, 7]) should return `[[9], [3, 15], [20], [7]]`");OUTPUT
Results will appear here.