Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 399. Evaluate Division
Given pairwise variable ratios, build a weighted graph (or use union-find with multiplicative weights) where edges represent divisions, and answer each query by finding a path between the two variables and multiplying edge weights along that path; return -1.0 if no path (variable undefined) exists.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early June, 2025
Amazon
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.