Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一种有效的算法来生成从根节点扩展的所有子树。该算法应该适用于任何树结构。任何人都可以贡献代码吗?
例如,给定树的边为 0->1、0->2、2->3。有六个子树:0,
0,1
0,2
0,1,2
0,2,3
0,1,2,3
您可能想看看 TRIPS 算法:论文