Data Structures in Golang - Binary Search Tree

preview_player
Показать описание
Hello, in this tutorial I’ll be talking about binary search trees in Golang. You will learn the basic concepts of binary search trees, how they work and why we should use them. And after that, I will guide you through the process of searching and inserting data in a binary search tree in code,

00:02 Brief introduction of the contents of this video
00:26 Binary search tree (BST) terminology and meaning
01:31 Inserting data in a BST
02:18 Searching a node in a BST
02:49 Advantages of a BST
03:50 Defining a Node struct
05:26 Insert Method
09:20 Search Method
13:15 Counting the Search() method call

Thank you so much for watching!

#golang
Рекомендации по теме
Комментарии
Автор

It's a brilliant explanation. Thank you so much. 😘

МихаилГорбунов-цу
Автор

This is amazing! I really loved it. Please share more videos like this. Keep up the great work!

MelesZawudie
Автор

Following your content, it's amazing how you teach and how easy it's to learn from you!

fagnersales
Автор

Question, how can we instantiate a tree with a nil node? This way we could check if the root is nil, we insert the new value at the root directly.

prasangsayzzhii
Автор

Thank you. It is great stuff. However (;-) ) I am unhappy that the receiver of the insert and search is a Node Pointer instead of the tree root itself. I understand that you take advantage of the recursive nature of a tree but I am afraid that the possibility to point to any node in the tree might lead to errors that are very hard to detect.

riceblues
welcome to shbcf.ru