摘要: 使用栈遍历,非递归 function getDepth(data = []) { let stack = [data] let depth = 0 while (stack.length > 0) { let temp = [] const list = stack.pop() if (list.l 阅读全文
posted @ 2022-01-05 10:08 JoVee 阅读(502) 评论(0) 推荐(0) 编辑