levelOrder = function(root) {
  let ret = []
  if(root===null){
    return ret
  }
  let queue = [root]
  while(queue.length){
    let curLevel = []
    let len = queue.length
    for(let i=0;i<len;i++){
      let node = queue.shift()
      curLevel.push(node.val)
      // for()
      node.children.forEach(child=>{
        child && queue.push(child)
      })
      // node.left && queue.push(node.left)
      // node.right && queue.push(node.right)
    }
    ret.push(curLevel)
  }
  return ret
}
@param {Node|null} root
@return {number[][]}