← AlgoMindset 75

Evaluate Division

Medium🎙 Interview me on this

🧠 Before you code — what pattern fits?

You are given equations like a / b = 2.0 as pairs [a, b] with values, and queries [c, d]. Return the answer for each query, or -1.0 if it cannot be determined.

equations [["a","b"],["b","c"]], values [2,3], query a/c → 6.0

🎬 Video explanation · NeetCodeIO

Your solution runs against 1 unit tests, including edge and large-value cases.

Loading...

Test console · 1 unit tests

Submit your code to run it against all 1 unit tests. Results appear here.

JavaScript, TypeScript & Python run sandboxed in your browser; other languages run on the execution server. Your code is saved locally as you type.