Surprise Me!

How to Search in a Binary Search Tree (BST) - Step by Step Explanation with Examples

2026-05-02 3 Dailymotion

In this video we walk through how to perform searches in a Binary Search Tree. Starting with a perfectly balanced BST, we cover the search process step by step, including finding existing nodes like 73 and determining that numbers like 44 do not exist in the tree.

We discuss time complexity for searches in BSTs - O(log n) on average for balanced trees and O(n) in the worst case when the tree becomes skewed like a linked list due to sorted or bad data. Learn why each comparison eliminates half the remaining data and how height affects performance.

Perfect for students learning data structures and algorithms. If you're studying BSTs, this clear explanation will help you understand searching, insertion paths, and why self-balancing trees matter.

Thanks for watching!

00:00 Introduction to BST Search
00:31 BST Not Self-Balancing
00:40 Average Case Log Time
00:53 Linear Time in Worst Case
01:13 How BST Search Works
01:18 Search Path Example
02:08 Searching for Existing Node
02:35 Searching for Non-Existent Node
03:19 Tree Size and Height
03:30 Time Complexity O(h)
05:40 Bad Data Example
08:23 Skewed Tree Like Linked List
09:53 Linear Time in Worst Case
11:58 Why Log Time
12:36 Halving the Search Space
14:14 O(log n) Summary
14:28 Conclusion

binary search tree, BST search, binary search tree tutorial, data structures, algorithms, BST explained, search in BST, binary tree search, tree traversal, log n time, data structures and algorithms, computer science, programming tutorial

=-=-=-=-=-=-=-=-=

Thanks for watching!

Find us on other social media here:
- https://www.NeuralLantern.com/social
- Twitter / X: https://x.com/NeuralLantern
- Rumble: https://rumble.com/c/c-3696939
- BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt
- Daily Motion: https://www.dailymotion.com/neurallantern
- Minds: https://www.minds.com/neurallantern/
- Odysee: https://odysee.com/@NeuralLantern:5

Please show your support!

- Buy me a coffee: https://ko-fi.com/neurallantern

- Subscribe + Sharing on Social Media
- Leave a comment or suggestion
- Subscribe to the Blog: https://www.NeuralLantern.com
- Watch the main "pinned" video of this channel for offers and extras