Algorithm · Applied Intuition · Medium
You are given a collection of variable definitions. A variable may be assigned a plain integer, or an expression built solely from addition operations. Each operand in an expression is either an integer literal or the name of another variable. Your task is to compute the final integer value for every variable and output the results as a JSON object with keys sorted lexicographically. If any expression refers to a variable that has not been defined, output the exact string…
Checking your access…