Evaluate arithmetic expression using DFS | Instacart Interview Question