← Amazon questions

Celebrity problem, path between two tree nodes, and tree height from parent array

Filed under Amazon

Given a parent array representing a tree where parent[i] is the parent of node i, find the height of the tree. (Note: The prompt also mentions celebrity and tree path problems as part of a multi-part…

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.