问题描述
我目前正在用C ++开发一个程序,该程序可以从环形拓扑中的简单节点中检测超级节点.我的要求是我需要从简单节点遍历到超级节点,并突出显示所有可能进入超级节点的路径.这包括超级节点和简单节点之间的环形拓扑.
我想编写一个递归函数来查找路径.请让我知道是否有人对如何开发可检测到它的递归函数有任何想法.
我已经链接了这些图像,以便更好地理解:
Starting.JPG [ ^ ]
Expected.JPG [ ^ ]
Hi,
I am currently developing a program in C++ which detects super node from a simple node in a ring type topology. My requirement is that I need to traverse from simple node to super node and highlight all the possible paths which are going to super node. This includes ring topology in between super node and simple node.
I would like to write a recursive function to find the path. Please let me know if anyone has any idea about how to develop recursive function which detects it.
I have linked these images for better understanding:
Starting.JPG[^]
Expected.JPG[^]
推荐答案
这篇关于从简单节点到超级节点的遍历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!