---
title: "Discussion on \"Binary Search Tree Time Complexity: Why O(log n) Isn't Guaranteed\" | Hashnode"
description: "Discussion on \"Binary Search Tree Time Complexity: Why O(log n) Isn't Guaranteed\". Binary search tree operations promise O(log n) but only when balance holds. Here is why sorted input breaks a BST and how to fix it."
url: "https://hashnode.com/posts/binary-search-tree-time-complexity-why-o-log-n-isn-t-guaranteed/6a14130c7d85e6a1afb50aa7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Binary Search Tree Time Complexity: Why O(log n) Isn't Guaranteed](https://codeintuition.hashnode.dev/binary-search-tree-time-complexity-why-o-log-n-isn-t-guaranteed?utm_source=hashnode&utm_medium=feed)

Binary search tree operations promise O(log n) but only when balance holds. Here is why sorted input breaks a BST and how to fix it.

May 25 · 10 min read · codeintuition.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#interview](https://hashnode.com/tag/interview)
-   [#faang](https://hashnode.com/tag/faang)
-   [#codeintuition](https://hashnode.com/tag/codeintuition)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#learning](https://hashnode.com/tag/learning)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#time-complexity](https://hashnode.com/tag/time-complexity)

## Written by

[Prakhar Srivastava](https://hashnode.com/@prakhar-srv)

@prakhar-srv · London, UK

  
[View profile](https://hashnode.com/@prakhar-srv)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
