Evaluate Division
A medium-tier problem at 63% community acceptance, tagged with Array, String, Depth-First Search. Reported in interviews at GE Healthcare and 16 others.
Evaluate Division shows up in interviews at Uber, Stripe, BlackRock, and Citadel, and it catches people off-guard because it doesn't feel like a graph problem at first. You're given equations like a/b=2.0 and c/d=3.0, then asked to evaluate queries like a/x. The obvious move, just solve for each variable, falls apart when variables span disconnected equation groups. Most candidates waste 15 minutes on algebra before realizing this is really about building a weighted graph and traversing it. If you freeze on the pattern during a live assessment, StealthCoder surfaces the graph construction and BFS/DFS path logic in seconds, invisible to the proctor.
Companies that ask "Evaluate Division"
Evaluate Division is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoderThe trick is treating each equation as a bidirectional edge in a graph. If a/b=2.0, you add edges a->b (weight 2.0) and b->a (weight 0.5). Each variable is a node. To evaluate a/x, you search for a path from a to x, multiplying weights along the way. Candidates either miss the graph structure entirely and try symbolic math, or they build the graph but botch the traversal by forgetting to handle bidirectional edges or reset visited state between queries. BFS and DFS both work here. Union Find can also work but requires careful tracking of ratios relative to each root, which adds cognitive load. The acceptance rate sits at 63%, meaning roughly one-third of attempts fail, usually from either missing the graph framing or making off-by-one errors in path multiplication. StealthCoder is the hedge when this pattern doesn't click during the real assessment.
Pattern tags
You know the problem.
Make sure you actually pass it.
Evaluate Division recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Evaluate Division interview FAQ
Why does Evaluate Division trip up so many people if it's Medium difficulty?+
Because the problem statement doesn't scream 'graph.' You see algebra and equations, so you think math. By the time you realize you need to model variable relationships as a graph with weighted edges, you've burned mental cycles. The 63% acceptance rate reflects exactly this misdirection.
Is this still asked at FAANG-tier companies?+
Yes. It's confirmed across Stripe, Uber, Snap, and Citadel in the top companies list. It's popular because it forces you to recognize an implicit graph structure, which is a real skill in system design interviews later.
What's the difference between solving this with BFS, DFS, or Union Find?+
BFS and DFS both work equally well for finding a path and calculating the product of edge weights. Union Find is trickier because you have to track the ratio of each variable relative to its root, which adds complexity. Most solutions use BFS or DFS for clarity.
What mistakes kill most solutions on this problem?+
Forgetting the graph is bidirectional. If a/b=2, you need both a->b and b->a. Second mistake: not resetting your visited set between queries, so the second query sees stale visited state. Third: multiplying edge weights wrong when backtracking in DFS.
How does this relate to the Shortest Path topic?+
Evaluate Division is a shortest-path variant where 'shortest' means the path from one node to another in the graph. Instead of minimizing distance, you multiply edge weights. Any shortest-path algorithm (BFS, DFS, Dijkstra) adapts to this. It's why the problem tags both Shortest Path and Graph.
Want the actual problem statement? View "Evaluate Division" on LeetCode →