Search
⌘K

Leetcode 2076. Process Restricted Friend Requests

Process a sequence of friend requests using a disjoint-set to maintain friend groups, accepting a request only if merging the two components would not put any restricted pair into the same component (restrictions apply transitively). The core challenge is efficiently checking these forbidden pairs before each union so you can return a boolean success array.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.