datastructures-0.1.0
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | datastructures-0.1.0 |
| نام | datastructures |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Luca Sbardella |
| ایمیل نویسنده | luca@quantmind.com |
| آدرس صفحه اصلی | https://github.com/quantmind/datastructures |
| آدرس اینترنتی | https://pypi.org/project/datastructures/ |
| مجوز | BSD |
Data Structures
===================
|ci|
Binary Tree
--------------
A `binary tree`_ implementation is available:
.. code:: python
from datastructures import Tree, Node
tree = Tree()
tree.size() // 0
tree.max_depth() // 0
tree.root // None
root = tree.add() // Node
root.left = Node()
tree.size() // 2
tree.max_depth() // 2
To check if the tree is a `binary search tree`_:
.. code:: python
tree.is_bst()
.. |ci| image:: https://travis-ci.org/quantmind/datastructures.svg?branch=master
:target: https://travis-ci.org/quantmind/datastructures
.. _`binary tree`: https://en.wikipedia.org/wiki/Binary_tree
.. _`binary search tree`: https://en.wikipedia.org/wiki/Binary_search_tree
نحوه نصب
نصب پکیج whl datastructures-0.1.0:
pip install datastructures-0.1.0.whl
نصب پکیج tar.gz datastructures-0.1.0:
pip install datastructures-0.1.0.tar.gz