← Microsoft questions

Max height and path of tree

Filed under Microsoft

Given a binary tree, find its maximum height (maximum depth) and print or return all nodes lying on that longest path from the root to a leaf.

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

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