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.
正在翻译中..