MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / Node

Class Node

data_structures/binary_tree/merge_two_binary_trees.py:12–20  ·  view source on GitHub ↗

A binary node has value variable and pointers to its left and right node.

Source from the content-addressed store, hash-verified

10
11
12class Node:
13 """
14 A binary node has value variable and pointers to its left and right node.
15 """
16
17 def __init__(self, value: int = 0) -> None:
18 self.value = value
19 self.left: Node | None = None
20 self.right: Node | None = None
21
22
23def merge_two_binary_trees(tree1: Node | None, tree2: Node | None) -> Node | None:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected