


"""simple docstring"""



class       __a	:







				def __init__(   self			,  UpperCAmelCase      ):

					'''simple docstring'''






					lowerCAmelCase_			       = data
					lowerCAmelCase_			       = None
					lowerCAmelCase_			       = None




def     UpperCAmelCase    (					_lowercase   :      BinaryTreeNode | None ,      _lowercase   :      int  )	->   BinaryTreeNode | None:


	"""simple docstring"""




	if node is None:
		lowerCAmelCase_			       = BinaryTreeNode(_lowercase  )
		return node

	# binary search tree is not empty,
	# so we will insert it into the tree
	# if new_value is less than value of data in node,
	#  add it to left subtree and proceed recursively
	if new_value < node.data:
		lowerCAmelCase_			       = insert(node.left_child ,      _lowercase  )
	else:
		# if new_value is greater than value of data in node,
		#  add it to right subtree and proceed recursively
		lowerCAmelCase_			       = insert(node.right_child ,      _lowercase  )
	return node
def     UpperCAmelCase    (					_lowercase   :      None | BinaryTreeNode  )	->   list[int]:  # if node is None,return


	"""simple docstring"""




	if node:
		lowerCAmelCase_			       = inorder(node.left_child  )
		lowerCAmelCase_			       = [*inorder_array, node.data]
		lowerCAmelCase_			       = inorder_array + inorder(node.right_child  )
	else:
		lowerCAmelCase_			       = []
	return inorder_array
def     UpperCAmelCase    (					)	->   BinaryTreeNode | None:


	"""simple docstring"""




	lowerCAmelCase_			       = insert(_lowercase ,      1_5  )
	insert(_lowercase ,      1_0  )
	insert(_lowercase ,      2_5  )
	insert(_lowercase ,      6  )
	insert(_lowercase ,      1_4  )
	insert(_lowercase ,      2_0  )
	insert(_lowercase ,      6_0  )
	return root
def     UpperCAmelCase    (					)	->   None:


	"""simple docstring"""




	lowerCAmelCase_			       = make_tree()
	print('''Printing values of binary search tree in Inorder Traversal.'''  )
	inorder(_lowercase  )


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		main()



"""simple docstring"""



import doctest

import projectq
from projectq.ops import H, Measure
def     UpperCAmelCase    (					_lowercase   :      projectq.cengines._main.MainEngine  )	->   int:


	"""simple docstring"""




	lowerCAmelCase_			       = quantum_engine.allocate_qubit()
	H | qubit
	Measure | qubit
	return int(_lowercase  )


if __name__ == "__main__":
		doctest.testmod()

		# initialises a new quantum backend
		lowercase_							 =       projectq.MainEngine()

		# Generate a list of 10 random numbers
		lowercase_							 =       [get_random_number(quantum_engine) for _ in range(10)]

		# Flushes the quantum engine from memory
		quantum_engine.flush()

		print('Random numbers', random_numbers_list)