/
binary_tree.rst
55 lines (40 loc) · 1.31 KB
/
binary_tree.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.. _binary_tree:
Binary Tree
===========
.. automodule:: extra.trees.binary_tree
:noindex:
:members:
:special-members:
:exclude-members: BinaryTreeNode, BinaryTree
.. image:: ../../_images/trees/binary_tree.gif
:align: center
:height: 650
⏱ Time-Complexity
-------------------
The following table sums up all the different public functionality in this
class and also provides the worst-case time complexity along side with the
optimal time complexity that I will try to reach in future releases Insha'Allah.
Generally, we are going to use the following indicators in the table:
- **n** is the number of nodes currently in the binary tree.
.. csv-table::
:file: ../../_files/trees/binary_tree.csv
:header-rows: 1
:widths: 10, 70, 10, 10
☕️ API
*******
BinaryTreeNode()
----------------
Here are all of the public methods that can be used with `BinaryTreeNode()`
objects:
.. autoclass:: extra.trees.binary_tree.BinaryTreeNode
:members:
:special-members:
:exclude-members: set_children
--------------------------------------------------------------------------------
BinaryTree()
------------
Here are all of the public methods that can be used with `BinaryTree()` objects:
.. autoclass:: extra.trees.binary_tree.BinaryTree
:members:
:special-members:
:exclude-members: