树的广度优先遍历 [英] breadth first traversing of tree
本文介绍了树的广度优先遍历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过bfs遍历树的所有节点,树与sql server中具有父子关系的表中的数据绑定
我要根据广度优先遍历到树的所有节点的内容
how to travers all the nodes of a tree by bfs, the tree is binded with the data from a table in sql server which has parent child relationship
what i want to all the nodes of a tree according to breadth first travers
推荐答案
这里是一个链接,它将使您对广度优先搜索的算法有所了解,
http://en.wikipedia.org/wiki/Breadth-first_search [
here is a link, which will give you idea about the algorithms of Breadth-First search,
http://en.wikipedia.org/wiki/Breadth-first_search[^]
modify it according to your problem.
(your question is not much clear, post some codes, your table structure and then ask explain how the results should be)
希望此链接帮助:)
http://www.dzone.com/snippets/breadth-first-search-c [ ^ ]
http://stackoverflow.com/a/687752 [ http://stackoverflow.com/a/5111694 [ http://cboard.cprogramming.com/csharp-programming/150370-breadth- first-search-csharp.html [ ^ ]
Hope this links help :)
http://www.dzone.com/snippets/breadth-first-search-c[^]
http://stackoverflow.com/a/687752[^]
http://stackoverflow.com/a/5111694[^]
http://cboard.cprogramming.com/csharp-programming/150370-breadth-first-search-csharp.html[^]
这篇关于树的广度优先遍历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文