rideOS interview question

A problem based on graph algorithms (BFS, DFS).