Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2003. Smallest Missing Genetic Value in Each Subtree
Given a rooted tree where each node has a distinct genetic value (1..1e5), compute for every node the smallest positive integer (mex) that is missing from that node's subtree. The challenge is to produce these subtree mex values efficiently for up to 1e5 nodes/values.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.