This question evaluates proficiency in core graph algorithms (topological sort, BFS/DFS, and shortest-path algorithms like Dijkstra), understanding of time/space complexity, memory layout trade-offs (CSR vs adjacency lists), and parallel traversal strategies for CPU and GPU.
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.