<分区>
如果你能向我解释如何遍历这棵树(最好是在 javascript 中),我将非常感激:
顺序为:1-3-8 | 4-6-3-8 | 7-6-3-8 | 13-14-10-8
模拟数据可能如下所示:
let tree = {
'parent': {
'immediate child': {
'post immediate child'
}
'second immediate child': {
'second post immediate child'
}
}
}
function goUpTheTree(tree) {
}
任何帮助将不胜感激...