// Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

// For example:
// Given binary tree {3,9,20,#,#,15,7},
//     3
//    / \
//   9  20
//     /  \
//    15   7
// return its level order traversal as:
// [
//   [3],
//   [9,20],
//   [15,7]
// ]


/**
 * Definition for a binary tree node.
 * function TreeNode(val) {
 *     this.val = val;
 *     this.left = this.right = null;
 * }
 */

@@ -453,8 +453,614 @@
 * %7D%0A */%0A
+%0A%0Avar levelOrder = function(root) %7B%0A    var lib = %7B%7D,%0A        result = %5B%5D;%0A%0A    function traverse(cNode, cDepth)%7B%0A        if(cNode === null)%7B%0A            return;%0A        %7D%0A        else %7B%0A            if(lib%5BcDepth%5D === undefined)%7B%0A                lib%5BcDepth%5D = %5BcNode.val%5D;%0A            %7D%0A            else  %7B%0A                lib%5BcDepth%5D.push(cNode.val);%0A            %7D%0A            traverse(cNode.left, cDepth+1);%0A            traverse(cNode.right, cDepth+1);%0A        %7D%0A    %7D%0A    traverse(root, 1);%0A    for(var i = 1; i %3C= Object.keys(lib).length; i++)%7B%0A        result.push(lib%5Bi%5D);%0A    %7D%0A    return result;%0A%7D;%0A

add solution