Initialize first, add the source point to the queue; then iterate, every time the head node of the queue is obtained, all the vertices adjacent to the head node of the queue are subjected to the relaxation operation. If the relaxation is successful, check whether the vertex performing the relaxation operation is in In the queue, if the vertex is not added to the queue; repeat the optimization of the current shortest path until the queue is empty.Start with initialization, add a source point to the queue, then iterate, relax all vertes adjacent to the team's first node each time you get the queue's first node, check if the vertement performing the relaxation operation is in the queue if the vertement is not added to the queue, and repeatedly optimize the current shortest path until the queue is empty.First, initialize and add the source point in the queue; then iterate. Every time the first node of the queue is obtained, relax all the vertices adjacent to the first node of the queue. If the relaxation is successful, check whether the vertex performing the relaxation is in the queue. If not, add the vertex to the queue; repeatedly optimize the current shortest path until the queue is empty.