摘要: //后序遍历 function postOrder(tree) { console.log(tree); if (tree !== null) { postOrder(tree.firstElementChild); postOrder(tree.lastElementChild); ... 阅读全文
posted @ 2017-03-09 22:47 剑阁王者 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 思路 前四次都执行函数A,得到1,2,3,4,添加4,3,第五次执行B,得到4,添加4,接着添加2,第六次执行函数B,得到3,在添加3之前第七次执行函数A,得到4,添加4,在添加3,,第八次执行函数B,得到4,添加4,在添加1,第九次执行函数B,得到2,在添加之前第10次执行函数A;得到3,第11次 阅读全文
posted @ 2017-03-09 22:28 剑阁王者 阅读(725) 评论(0) 推荐(0) 编辑