Suggest an editImprove this articleRefine the answer for “What is the depth of a node (depth)?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A node's depth** is the distance from the root to that node, measured as the number of edges between them. **Key point:** a node's depth shows how deep it is in the tree relative to the root.Shown above the full answer for quick recall.Answer (EN)Image**A node's depth** is the **distance from the root to that node**, measured as the number of **edges** between them. **Formally:** - **The root's depth** = 0 (since there are 0 edges from the root to itself). - The depth of any other node = the depth of its parent + 1. **Example:** ```javascript A / \ B C / \ D E ``` - `A` → depth 0 - `B, C` → depth 1 - `D, E` → depth 2 **Difference from height:** - **Depth** is how many steps you take *down* from the root to a node. - **Height** is how many steps *up* from a node to the deepest leaf. **Summary:** **A node's depth** shows **how deep it is** in the tree relative to the root.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.