← Google questions

Add graph edges incrementally avoiding paths between restricted pairs

Filed under Google

Given a graph of N vertices, an edge list M, and a set of restricted pairs K, add edges from M one by one in order. If adding an edge would create a path between any pair in K, that edge must be…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.