MCPcopy Index your code
hub / github.com/joowani/binarytree / max_node_value

Method max_node_value

binarytree/__init__.py:1397–1416  ·  view source on GitHub ↗

Return the maximum node value of the binary tree. :return: Maximum node value. :rtype: float | int **Example**: .. doctest:: >>> from binarytree import Node >>> >>> root = Node(1) >>> root.left = Node(2)

(self)

Source from the content-addressed store, hash-verified

1395
1396 @property
1397 def max_node_value(self) -> NodeValue:
1398 """Return the maximum node value of the binary tree.
1399
1400 :return: Maximum node value.
1401 :rtype: float | int
1402
1403 **Example**:
1404
1405 .. doctest::
1406
1407 >>> from binarytree import Node
1408 >>>
1409 >>> root = Node(1)
1410 >>> root.left = Node(2)
1411 >>> root.right = Node(3)
1412 >>>
1413 >>> root.max_node_value
1414 3
1415 """
1416 return _get_tree_properties(self).max_node_value
1417
1418 @property
1419 def max_leaf_depth(self) -> int:

Callers

nothing calls this directly

Calls 1

_get_tree_propertiesFunction · 0.85

Tested by

no test coverage detected