Salesforce dependency tree creation
I am working on a program to traverse through relationship fields between object and create a DAG, I am currently using Khan’s algorithm for this, is there any better DAG creation algorithms that are better at memory and speed?