๐ŸŽ“How I Study AIHISA
๐Ÿ“–Read
๐Ÿ“„Papers๐Ÿ“ฐBlogs๐ŸŽฌCourses
๐Ÿ’กLearn
๐Ÿ›ค๏ธPaths๐Ÿ“šTopics๐Ÿ’กConcepts๐ŸŽดShorts
๐ŸŽฏPractice
๐ŸงฉProblems๐ŸŽฏPrompts๐Ÿง Review
Search

Concepts3

Category

๐Ÿ”ทAllโˆ‘Mathโš™๏ธAlgo๐Ÿ—‚๏ธDS๐Ÿ“šTheory

Level

AllBeginnerIntermediateAdvanced
Filtering by:
#difference constraints
โš™๏ธAlgorithmIntermediate

SPFA (Shortest Path Faster Algorithm)

SPFA is a queue-based optimization of Bellmanโ€“Ford that only relaxes edges from vertices whose distance just improved.

#spfa#bellman-ford#shortest path+12
โš™๏ธAlgorithmIntermediate

Bellman-Ford Algorithm

Bellmanโ€“Ford finds single-source shortest paths even when some edge weights are negative.

#bellman-ford#single-source shortest paths#negative weights+12
๐Ÿ—‚๏ธData StructureIntermediate

DSU with Weighted Edges

A DSU with weighted edges (also called a potential or difference-constraint union-find) maintains relative values between elements while still supporting near-constant-time merges and finds.

#dsu#union-find#weighted edges+11