Given a scene or dependency graph, implement topological sort, BFS/DFS, and shortest path (Dijkstra). Discuss time/space complexity, memory layouts (CSR vs adjacency lists), and how you would parallelize traversals on CPU vs GPU while avoiding contention and ensuring determinism in a test framework.