- **Retrieve Current Tentative Distance:** - Get the t…
- **Retrieve Current Tentative Distance:**
- Get the tentative distance to the **current node** (let's denote this as **D_current**).
- **Edge Weight:**
- Determine the **weight of the edge** from the current node to the neighbor node (denote this as **W_edge**).
- **Calculate New Tentative Distance:**
- **New Tentative Distance = D_current + W_edge**
- This represents the distance from the starting node to the neighbor node **via the current node**.
- **Compare and Update:**
- If the **new tentative distance** is **less than** the neighbor node's previously recorded tentative distance, update it with the new, smaller value.