Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Breadth First Search
#1
Can someone elaborate on how they are implementing their breadth first search? Right now I am adding the root vertex to a queue and then enqueing all the vertices that are connected by edges in the MST. However, this is making the act of sorting each level by edge weight very difficult. Is there a specific way to fix this?
Reply
#2
(11-20-2018, 05:28 AM)amjohnson36 Wrote: Can someone elaborate on how they are implementing their breadth first search? Right now I am adding the root vertex to a queue and then enqueing all the vertices that are connected by edges in the MST. However, this is making the act of sorting each level by edge weight very difficult. Is there a specific way to fix this?

You could use a DA or CDA. Would make it easier to sort each level.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)