Suggest an editImprove this articleRefine the answer for “What is the time complexity of searching for a node in a binary tree?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The complexity of **finding a node** in a binary tree depends on its structure: whether it is balanced or not. **Key point:** in a balanced tree, search runs in O(log n); in the worst case (a degenerate tree), it runs in O(n).Shown above the full answer for quick recall.Answer (EN)ImageThe complexity of **finding a node** in a binary tree depends on its structure: whether it is balanced or not. **1. In a balanced binary search tree (BST):** Each comparison rules out half of the remaining elements. Average and best-case complexity: **O(log n)** **2. In an unbalanced tree:** If elements are inserted, for example, in increasing order, the tree turns into a **chain (a list)**. Worst-case complexity: **O(n)** **3. Example:** ```javascript 8 / \ 3 10 / \ 9 14 ``` To find `9`: `8 → 10 → 9` - three steps (≈ log₂7 ≈ 3). **Summary:** - **Average case (balanced tree):** O(log n) - **Worst case (degenerate tree):** O(n)For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.