← Microsoft questions

Maximum depth of a binary tree and furthest leaf

Filed under Microsoft

Given the root of a binary tree, write a function that finds the maximum depth of the tree and returns a tuple containing both the maximum depth and the node value of the leaf at that depth (furthest…

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.