OA: Simple Network Endpoint

Easy · Coding · 30 min

Follow unique outgoing edges in a directed network until reaching a sink or right before revisiting a previously visited node, then compute endpoints for all nodes in linear O(V + E) time.

This is a Pro problem. Pro unlocks the full prompt, a step-by-step walkthrough, a reference solution and tests you can run.

See Pro plans

More OpenAI problems