
Algorithm & Data Structure
[백준] 타임머신 (11657번) - Python/Algorithm
✅문제 - [백준] 타임머신 (11657번) ✅필요 알고리즘 개념 - Bellaman-Ford Algorithm🔵 Bellman-Ford AlgorithmBellman-Ford 알고리즘은 한 node 에서 다른 모든 node 들로 가는 최단 거리를 구하는 알고리즘이다. 🔵 Bellman-Ford Algorithm 와 Dijkstra Algorithm의 차이1. Dijkstra Algorithm는 음의 가중치를 갖지 않는 상황에서 사용한다.이때 순간순간 가중치가 가장 작은 간선을 선택하는 것이 최단거리를 보장하므로 Greedy와 Priority Que를 이용하여 구현할 수 있다. 2. Bellman Ford Algorithm은 음의 가중치를 갖는 상황에서 사용한다.이때는 가중치가 가장 작은 간선을 ..