Consider a list of variable pairs equations and their corresponding values. Each entry means equations[i][0] / equations[i][1] = values[i]. You then receive queries, where each query asks for the result of dividing one variable by another. Amazon asks graph problems that model real dependency and relationship queries.
For example, if a / b = 2.0 and b / c = 3.0, then the query a / c should return 6.0. If a variable doesn't exist or no path connects the two variables, return -1.0.
Think about it: how would you represent these division relationships so you can chain them together to answer any query?