






from __future__ import annotations




class 							__A	:





				"""simple docstring"""







				def __init__(					self				,    lowerCamelCase__       ):




									"""simple docstring"""

									__UpperCamelCase :   Union[str, Any]									=value
									__UpperCamelCase :   Node | None									=None
									__UpperCamelCase :   Node | None									=None




class 							__A	:





				"""simple docstring"""







				UpperCamelCase__					: int


				def __init__(					self       ):




									"""simple docstring"""

									__UpperCamelCase :   Union[str, Any]									=0


				def  __lowercase				(					self				,    lowerCamelCase__				,    lowerCamelCase__       ):




									"""simple docstring"""

									if node is None:
														return

									if path_sum == self.target:
														self.paths += 1

									if node.left:
														self.depth_first_search(node.left				,    path_sum + node.left.value       )
									if node.right:
														self.depth_first_search(node.right				,    path_sum + node.right.value       )







				def  __lowercase				(					self				,    lowerCamelCase__				,    lowerCamelCase__ = None       ):




									"""simple docstring"""

									if node is None:
														return 0
									if target is not None:
														__UpperCamelCase :   List[str]									=target

									self.depth_first_search(lowerCamelCase__				,    node.value       )
									self.path_sum(node.left       )
									self.path_sum(node.right       )

									return self.paths


if __name__ == "__main__":
							import doctest

							doctest.testmod()









from __future__ import annotations






def 				A	(			a_				,a_   )	->		list[int]:
					__UpperCamelCase :   dict[int, int]									={}
					for index, val in enumerate(a_   ):
										__UpperCamelCase :   Union[str, Any]									=target - val
										if compl in chk_map:
															return [chk_map[compl], index]
										__UpperCamelCase :   List[Any]									=index
					return []


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							print(f"{two_sum([2, 7, 11, 15], 9) = }")

