Building hierarchy objects from flat list of parent/child

前端 未结 6 577
花落未央
花落未央 2021-01-30 18:07

I have a list of items in a hierarchy, and I\'m attempting to parse this list out into an actual hierarchy of objects. I\'m using modified pre-order tree traversal to store/iter

6条回答
  •  萌比男神i
    2021-01-30 18:37

    you should use a database store architecture like nested set

    [ https://en.wikipedia.org/wiki/Nested_set_model ]

提交回复
热议问题