Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 543. Diameter of Binary Tree
Given the root of a binary tree, return the diameter — the maximum number of edges on any path between two nodes; the core challenge is to compute subtree heights and track the maximum sum of left and right heights at each node in a single O(n) traversal.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early November, 2025
Meta
Mid-level
Early August, 2025
Meta
Senior
Late June, 2025
Meta
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.