Return the minimum leaf node depth of the binary tree. :return: Minimum leaf node depth. :rtype: int **Example**: .. doctest:: >>> from binarytree import Node >>> >>> root = Node(1) >>> root.left = Node(2)
(self)
| 1451 | |
| 1452 | @property |
| 1453 | def min_leaf_depth(self) -> int: |
| 1454 | """Return the minimum leaf node depth of the binary tree. |
| 1455 | |
| 1456 | :return: Minimum leaf node depth. |
| 1457 | :rtype: int |
| 1458 | |
| 1459 | **Example**: |
| 1460 | |
| 1461 | .. doctest:: |
| 1462 | |
| 1463 | >>> from binarytree import Node |
| 1464 | >>> |
| 1465 | >>> root = Node(1) |
| 1466 | >>> root.left = Node(2) |
| 1467 | >>> root.right = Node(3) |
| 1468 | >>> root.right.left = Node(4) |
| 1469 | >>> root.right.left.left = Node(5) |
| 1470 | >>> |
| 1471 | >>> print(root) |
| 1472 | <BLANKLINE> |
| 1473 | 1____ |
| 1474 | / \\ |
| 1475 | 2 3 |
| 1476 | / |
| 1477 | 4 |
| 1478 | / |
| 1479 | 5 |
| 1480 | <BLANKLINE> |
| 1481 | >>> root.min_leaf_depth |
| 1482 | 1 |
| 1483 | """ |
| 1484 | return _get_tree_properties(self).min_leaf_depth |
| 1485 | |
| 1486 | @property |
| 1487 | def properties(self) -> Dict[str, Any]: |
nothing calls this directly
no test coverage detected