- Tytuł:
-
Python implementation of binary trees
Implementacja drzew binarnych w języku Python - Autorzy:
- Matusiewicz, Ewelina
- Słowa kluczowe:
-
Python implementation of selected binary trees is presented. Basic operations supported by binary search trees are described: insertion of a node, deletion of a node, searching for a specific key, finding minimum or maximum node, finding the successor or the predecessor of a current node. Main tree traversal methods are shown: inorder, preorder, postorder, level-order.Binary search trees are basic structures used to implement dynamic sets of items that allow finding an item by its key. Searching is efficient only for balanced trees but for real data a tree may become unbalanced. That is why three modified kinds of trees are also shown. Red-black trees and AVL trees use an additional node attribute to ensure that trees remain approximately balanced. Splay trees improve access to frequently used nodes, they are placed near the root of the tree.All source code has been covered by unit test scripts.
binary search tree, red-black tree, AVL tree, splay tree, DSW algorithm, tree rotations, tree traversal - Pokaż więcej
- Dostawca treści:
- Repozytorium Uniwersytetu Jagiellońskiego