โ† Amazon questions

Count Special Nodes in Generic Tree with Distinct Paths

Filed under Amazon

Given a generic tree represented by an adjacency list and node values, count all special nodes. A node is defined as special if all the elements along the path from the root to that node are distinct.

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 Amazon questions

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