← Microsoft questions

Check if binary tree leaf depths differ by at most one

Filed under Microsoft

Check if a binary tree is balanced, specifically defined here as no two leaf nodes having a difference in depth greater than one.

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.