Glossary term
What is negative cycle? Meaning for developers
A loop whose total weight is below zero, so shortest distances keep getting smaller forever.
Learn it properly · DSALesson 52: Shortest PathsBFS when all steps cost the same, Dijkstra for other costs, and Bellman–Ford for limits.