VectorShift Interview Question

Use Python to implement a DAG algorithm