How does a Breadth-First Search work when looking for Shortest Path?

前端 未结 8 1470
太阳男子
太阳男子 2020-11-30 16:52

I\'ve done some research, and I seem to be missing one small part of this algorithm. I understand how a Breadth-First Search works, but I don\'t understand how exactly it wi

8条回答
  •  情歌与酒
    2020-11-30 17:00

    From tutorial here

    "It has the extremely useful property that if all of the edges in a graph are unweighted (or the same weight) then the first time a node is visited is the shortest path to that node from the source node"

提交回复
热议问题