InterviewDB Question · USA

Topmost Accessible Node: Find the Highest Ancestor a User Can Read Given Permission Rules

Question Details

Problem You have a permission tree where each node has an id, a parent_id, and an access_level (0=public, 1=restricted, 2=private). A user has a clearance level. A node is accessible if user_clearance >= node.access_level AND all ancestors are accessible. Given a target node and a user clearance, find the topmost accessible ancestor — the highest node in the path from root to target that the user can access. If the root itself is accessible, return the root. Follow-ups If the root itself is inac…

Full Details

🔒

Unlock all Figma questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a figma interview during the phone round.

It covers the following topics: Coding, Onsite, Phone .