Division relationships are transitive: if and , then . Graphs capture transitivity naturally, so you model each equation as a weighted directed edge and answer queries by finding paths.
You'll practice building adjacency lists from unusual input formats and running BFS on weighted graphs. Amazon's pricing systems chain currency conversions and unit rates the same way. This pattern shows up whenever relationships between entities can be multiplied along a path.