1p3a_oj Question

Friendship Connectivity with Union-Find (+ fully dynamic follow-up)

Question Details

There are n people labeled 0..n-1. You are given a sequence of operations to maintain friendships (undirected edges) and answer connectivity queries. Part 1 (main: additions only) Operation

Full Details

🔒

Unlock all Google questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a reported interview question from a google interview for a swe role during the coding round.

It covers the following topics: Union Find, Sql .