Given a graph of connected nodes, compute the final result in the correct order
Details
- Topologically sort nodes or evaluate recursively without recomputing everything unnecessarily
- Cache intermediate results for performance
- Detect invalid graphs (e.g. cycles, missing inputs) and handle gracefully