Addepar | Phone Screen | Backtracking Equations
Anonymous User
2057

Had a question for general SWE role phone screen where given some addition equations in the form of an array, determine the value of each variable.
For example:
C = A + D + 2
A = B + 3
D = A + 1
B = 3
Solve for each variable.

the input was given as 2D array like this where the first element is always the left side of the equal sign:
[ [C A D 2], [A B 3], [D A 1], [B 3] ]

Recursive backtracking question, but no idea how to solve. Anyone know or have a similar leetcode question?

Comments (6)