2018年5月13日
摘要: 层次遍历构建二叉树: 1.定义二叉树节点: 1 function TreeNode(val){ 2 this.val = val; 3 this.left = this.right = null; 4 } 2.层次遍历构建二叉树: 1 function createTree(arr){ 2 if(! 阅读全文
posted @ 2018-05-13 09:44 DavidXu2014 阅读(5563) 评论(0) 推荐(1)