NhacVibe
Ảnh bìa Python Data Structures #5: Binary Search Tree (BST)

Python Data Structures #5: Binary Search Tree (BST)

Brian Faure · 174 N lượt xem · 11 thg 9, 2017

Mô tả

Code below... In this video we'll begin by discussing the basics of the Binary Search Tree data structure, and towards the end, we'll move over to a coding editor and implement the ideas in Python code. Planning an extra video covering the different traversal methods you can choose from when using a BST, possibly another focused solely on the BST deletion function as well.

(PYTHON 2)
► Code for this lesson: https://github.com/bfaure/Python_Data...

(PYTHON 3)
► Code for this lesson: https://github.com/bfaure/Python3_Dat...

► BST Deletion Function    • Binary Search Tree (BST): Deletion Function  

► BST Validator Function    • Binary Search Tree (BST): Validator Function  

****

► Video series covering various common algorithms in Python:
   • Python Algorithms  

► Video series covering GUI development in Python (WIP):    • Python GUI Development #1 - First Steps  

In computer science, binary search trees (BST), sometimes called ordered or sorted binary trees, are a particular type of container: data structures that store "items" (such as numbers, names etc.) in memory. They allow fast lookup, addition and removal of items, and can be used to implement either dynamic sets of items, or lookup tables that allow finding an item by its key (e.g., finding the phone number of a person by name).
Binary search trees keep their keys in sorted order, so that lookup and other operations can use the principle of binary search: when looking for a key in a tree (or a place to insert